# Color: Names, Hex, rgb() and hsl()

CSS colors text with the color property and fills the area behind it with background-color, and it writes each color as a name, a hex code, rgb() or hsl(), with an alpha value when the color should be see-through.

![Cheat sheet: Color: Names, Hex, rgb() and hsl()](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/1208962e601044ce951be9b041a6b29a.webp)

- Category: CSS
- Level: Novice
- Tags: Background color, Color, CSS, Hex color, HSL color, Named color, RGB color
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/css-color-values-cheat-sheet
