Definition
CSS properties for foreground and text color using hex, RGB/RGBa, HSL/HSLa, or named color values.
Why It Matters
Visual presentation is the primary channel for user engagement and accessibility. Effective use of CSS colors enhances readability and branding.
Core Concepts
- Color Formats: Named,
#RRGGBB,rgb(),rgba(),hsl(),hsla(). color: Text/foreground color.opacity: Transparency for entire element including children.
.card {
color: #333; /* Hex */
background-color: rgba(255, 255, 255, 0.9); /* RGBa */
border-color: hsl(200, 100%, 50%); /* HSL */
}