CSS provides two fundamental color properties: color sets the foreground color (text and text decorations), and background-color sets the background. Both accept any valid CSS color value — named, hex, RGB, or HSL.
Colors on Borders, Shadows, and SVG
The border-color property sets the color of element borders. The box-shadow and text-shadow properties also accept color values. For SVG elements, fill colors the interior and stroke colors the outline. The special value currentColor is extremely useful — it inherits the element's color property, so borders and SVG icons automatically match the text color.
Always check your color contrast ratio with a tool like WebAIM Contrast Checker — WCAG AA requires a minimum ratio of 4.5:1 for normal text and 3:1 for large text (18pt+). Failing this makes your content unreadable for low-vision users.