CSS Colors

CSS Tutorial

⭐ CSS Colors

CSS allows you to set colors using different formats.


1️⃣ Color Names

Use predefined names like red, blue, green, yellow, etc.



2️⃣ Hexadecimal Colors

A 6-digit code starting with #.



3️⃣ RGB Colors

Define Red, Green, Blue values (0–255).



4️⃣ RGBA (RGB + Opacity)

a = transparency (0 to 1)



5️⃣ HSL Colors

Hue, Saturation, Lightness.



6️⃣ HSLA (HSL + Opacity)



📌 Example with All Types


 

You may also like...