Color Formats
/* Named color */
color: red;
color: tomato;
color: steelblue;
/* Hex (6-digit) */
color: #D62828;
color: #ffffff;
/* Hex shorthand (3-digit) */
color: #fff; /* same as #ffffff */
color: #333; /* same as #333333 */
/* RGB */
color: rgb(214, 40, 40);
/* RGBA — with opacity 0–1 */
color: rgba(214, 40, 40, 0.5);
/* HSL — hue (0-360), saturation %, lightness % */
color: hsl(0, 73%, 50%);
/* HSLA */
color: hsla(0, 73%, 50%, 0.8);Background Color
body {
background-color: #F5F3EE;
}
.card {
background-color: rgba(0, 0, 0, 0.05);
}CSS Custom Properties (Variables)
:root {
--primary: #D62828;
--bg: #F5F3EE;
}
button {
background: var(--primary);
color: var(--bg);
}Use HSL for design systems — easy to adjust lightness/saturation while keeping the same hue.