Back to Topics
CSS Colors
What are CSS Colors?
CSS colors are used to define the visual appearance of your website's text, backgrounds, and borders. Choosing the right color palette is crucial for creating a professional and engaging user experience.
Color Formats
- Color Names — Simple names like red, blue, and coral.
- HEX Codes — 6-digit codes like #ff0000 (red).
- RGB / RGBA — Red, Green, Blue values with optional transparency.
- HSL — Hue, Saturation, and Lightness for intuitive color picking.
Syntax
p {
color: #ec4899;
background-color: rgba(139, 92, 246, 0.1);
}
View My Practice Work