Colors in CSS different formats me define kiye ja sakte hain jaise:
- Color names (140+ supported)
- HEX values
- RGB values
- RGBA values
- HSL values
- HSLA values
- opacity
RGBA Colors
RGBA RGB ka extension hai jisme alpha channel hota hai jo opacity define karta hai colors in CSS par.
Syntax
Alpha value 0.0 (fully transparent) se 1.0 (fully opaque) ke beech hoti hai.
Example

HSLA Colors
HSLA HSL ka extension hai jisme alpha channel hota hai for opacity colors in CSS par.
Syntax
Alpha value 0.0 se 1.0 ke beech hoti hai.
Example

CSS Opacity Property
opacity property poore element ki transparency set karta hai colors in CSS par. (background + text dono).
Value 0.0 se 1.0 ke beech hoti hai.
Example

Note: Text bhi transparent ho jata hai.
CSS Color Keywords
CSS me kuch predefined keywords hote hain:
- transparent
- currentcolor
- inherit
The transparent Keyword
transparent color ko fully transparent bana deta hai.

Note: transparent = rgba(0,0,0,0)
The currentcolor Keyword
currentcolor element ke current text color ko use karta hai.
Example



The inherit Keyword
inherit parent element se value inherit karta hai.
Example

Colors in CSS different formats aur properties ke through control kiye ja sakte hain. RGBA aur HSLA opacity ke liye use hote hain, aur keywords jaise transparent aur currentcolor flexibility provide karte hain.