CSS Color
CSS Color is a CSS module that deals with colors, color types, color blending, opacity, and how you can apply these colors and effects to HTML content. Not all CSS properties that take a <color>
as a value are part of this module, but they do depend upon it.
Reference
Properties
Data types
Guides
- Applying color to HTML elements using CSS
-
A guide to using CSS to apply color to a variety of types of content. All color-related CSS properties are touched upon.
Tools
- Color picker tool
-
This tool makes it easy to create, adjust, and experiment with custom colors.
Specifications
Specification | Status | Comment |
---|---|---|
CSS Color Module Level 4 | Working Draft | |
CSS Color Module Level 3 | Recommendation | |
CSS Level 2 (Revision 1) | Recommendation | |
CSS Level 1 | Recommendation | Initial definition |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
CSS_Color |
1 |
12 |
1
1-3.5
|
9 |
9 |
2
1.1-2
|
1 |
18 |
4 |
10.1 |
1 |
1.0 |
percentages |
78 |
79 |
70 |
No |
No |
No |
78 |
78 |
No |
No |
No |
12.0 |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
CSS_Color |
49 |
79 |
48 |
No |
15 |
6 |
49 |
49 |
48 |
36 |
6 |
5.0 |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
CSS_Color |
1 |
12 |
1 |
3 |
3.5 |
1 |
1 |
18 |
4 |
10.1 |
1 |
1.0 |
BCD tables only load in the browser
color-adjust property
BCD tables only load in the browser
opacity property
BCD tables only load in the browser
See also
- Color-related properties that are part of other specifications:
background-color
,border-color
,outline-color
,text-decoration-color
,text-emphasis-color
,text-shadow
,caret-color
, andcolumn-rule-color
- In CSS, gradients aren't colors but images.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Color