Color data type |
Specified as a keyword or a numerical color value. |
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types |
alpha-value data type |
Specifies the transparency of a color. May be a <number> , in which case 0 is fully transparent and 1 is fully opaque, or a <percentage> , in which case 0% is fully transparent and 100% fully opaque. |
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types |
hue data type |
Specifies the <angle> , with a unit identifier of deg, grad, rad, or turn, or unitless <number> interpreted as deg, of the color wheel specific to the <absolute-color-functions> of which it is a component. |
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types |
Numeric colors |
Allow to specify color via numeric format such as Hex, RGB or HSL |
https://web.dev/learn/css/color/ |
Primary colors |
Red, green and blue |
https://web.dev/learn/css/color/ |
Hex notation |
Hexadecimal notation (often shortened to hex) is a shorthand syntax for RGB. The hexadecimal ranges are 0-9 and A-F. When used in a six digit sequence, they are translated to the RGB numerical ranges which are 0-255 which correspond to the red, green, and blue color channels respectively. |
https://web.dev/learn/css/color/ |
RGB |
RGB (Red, Green, Blue) colors are defined with the rgb() color function, using either numbers or percentages as parameters. The numbers need to be within the 0-255 range and the percentages are between 0% and 100%. |
https://web.dev/learn/css/color/ |
HSL |
HSL stands for hue, saturation and lightness. Hue describes the value on the color wheel, from 0 to 360 degrees, starting with red (being both 0 and 360). A hue of 180, or 50% would be in the blue range. Saturation is how vibrant the selected hue is. A fully desaturated color (with a saturation of 0%) will appear grayscale. And finally, lightness is the parameter which describes the scale from white to black of added light. A lightness of 100% will always give you white. |
https://web.dev/learn/css/color/ |
Color keywords |
There are 148 named colors in CSS. These are plain English names such as purple, tomato and goldenrod. |
https://web.dev/learn/css/color/ |