What Are HTML Color Codes?
HTML color codes represent colors on the web using three primary formats: HEX (e.g. #2563EB),
RGB (rgb(37, 99, 235)), and HSL (hsl(221, 83%, 53%)).
These formats can describe the same color using different values.
- HEX: Six-digit hexadecimal notation (RRGGBB) from
00toFF. - RGB / RGBA: Decimal values from
0to255, plus optional alpha transparency. - HSL / HSLA: Hue (0–360°), Saturation (0–100%), and Lightness (0–100%), ideal for creating tints and shades.