Color Formats
- Red, Green, Blue (HEX)
- Red, Green, Blue (RGB)
- Cyan, Magenta, Yellow (CMY)
- Red, Yellow, Blue (HSL)
- Red, Yellow, Blue (HWB)
HEX Colors
Where rr (red), gg (green) and bb (blue) are hexadecimal integers between 00 and ff, specifying the intensity of the color.
For example, #ff0000 is displayed as red, because red is set to its highest value (ff), and the other two (green and blue) are set to 00.
Another example, #00ff00 is displayed as green, because green is set to its highest value (ff), and the other two (red and blue) are set to 00.
Hexadecimal color values are supported in all browsers.
RGB Colors
Each parameter (red, green, and blue) defines the intensity of the color with a value between 0 and 255.
For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest value (255), and the other two (green and blue) are set to 0.
Another example, rgb(0, 255, 0) is displayed as green, because green is set to its highest value (255), and the other two (red and blue) are set to 0.
RGB color values are supported in all browsers.
CMYK Colors
CMYK colors is a combination of CYAN, MAGENTA, YELLOW , and BLACK.
Computer screens display colors using RGB color values. Printers often presents colors using CMYK color values.
CMYK is not supported in HTML, but it is suggested as a new standard in CSS4.
HSL Colors
HSL color values are supported in Edge, Chrome, Firefox, Safari, Opera 10+, and in IE9+.
HSL stands for Hue, Saturation, and Lightness.
HSL color values are specified with: hsl(hue, saturation, lightness)
HSL color values are supported in all major browsers.
HWB Colors
HWB is not supported in HTML (yet), but it is suggested as a new standard in CSS4.