Colors in CSS ka use web pages ko attractive aur visually appealing banane ke liye hota hai. CSS me colors different formats me define kiye ja sakte hain jaise color names, RGB, HEX, HSL, RGBA aur HSLA.
CSS Color Names
Colors in CSS ko directly predefined names se bhi use kar sakte ho.
Example:

Background Color
HTML elements ka background color set karne ke liye background-color use hota hai.
Example:
Text Color
Text ka color change karne ke liye color property use hoti hai.
Example:

Border Color
Borders ka color set karne ke liye border property ke saath color define karte hain.
Example:
Color Values in CSS
RGB Colors
RGB ka matlab hai Red, Green, Blue. Har value 0 se 255 ke beech hoti hai.
Example:

- Black:
rgb(0, 0, 0) - White:
rgb(255, 255, 255)
RGBA Colors
RGBA me extra alpha value hoti hai jo transparency control karti hai (0 to 1).
Example:

HEX Colors
HEX format #RRGGBB me hota hai.
Example:

- Black:
#000000 - White:
#ffffff
3-Digit HEX
Shortcut format jahan same values repeat hoti hain.
Example:

HSL Colors
HSL ka matlab hai Hue, Saturation, Lightness.
Example:

- Hue: 0–360 (color type)
- Saturation: % (intensity)
- Lightness: % (light/dark)
HSLA Colors
HSL + alpha (transparency)
Example:

Colors in CSS website design ka important part hain. Tum simple color names se lekar advanced formats (RGB, HEX, HSL) tak use kar sakte ho. Different formats tumhe flexibility dete hain design ko control karne ke liye.