S (saturation) and L (lightness) are percentages. As an, it implicitly wraps around such that -120deg=240deg, 480deg=120deg, -1turn=1turn, etc. By definition, red=0deg=360deg, with the other colors spread around the circle, so green=120deg, blue=240deg, etc. When written as a unitless, it is interpreted as degrees, as specified in CSS Color Module Level 3. H (hue) is an of the color circle given in degs, rads, grads, or turns in CSS Color Module Level 4. In browsers that implement the Level 4 standard, they accept the same parameters and behave the same way. Note: As of CSS Colors Level 4, hsla() is an alias for hsl(). Functional notation: rgb(R G B)ĬSS Colors Level 4 adds support for space-separated values in the functional notation. A (alpha) can be a between 0 and 1, or a, where the number 1 corresponds to 100% (full opacity). R (red), G (green), and B (blue) can be either s or s, where the number 255 corresponds to 100%. For example, #0f38 is the same color as #00ff3388. Likewise, the four-digit RGB notation ( #RGBA) is a shorter version of the eight-digit form ( #RRGGBBAA). For example, #f09 is the same color as #ff0099. The three-digit notation ( #RGB) is a shorter version of the six-digit form ( #RRGGBB). R (red), G (green), B (blue), and A (alpha) are hexadecimal characters (0–9, A–F). For example, #ff0000 is equivalent to #ff0000ff. Note: As of CSS Colors Level 4, rgba() is an alias for rgb().
Although various colors not in the specification (mostly adapted from the X11 colors list) were supported by early browsers, it wasn't until SVG 1.0 and CSS Colors Level 3 that they were formally defined.CSS Level 1 only included 16 basic colors, called the VGA colors as they were taken from the set of displayable colors on VGA graphics cards.Note: The list of accepted keywords has undergone many changes during the evolution of CSS: Though many keywords have been adapted from X11, their RGB values may differ from the corresponding color on X11 systems since manufacturers sometimes tailor X11 colors to their specific hardware.Several keywords are aliases for each other:.The color keywords all represent plain, solid colors, without transparency.Unlike HTML, CSS will completely ignore unknown keywords.The other color keywords should only be used in CSS and SVG. HTML only recognizes the 16 basic color keywords found in CSS1, using a specific algorithm to convert unrecognized values (often to completely different colors).There are a few caveats to consider when using color keywords: Although the names more or less describes their respective colors, they are essentially artificial, without a strict rationale behind the names used.
The CMYK code consists of four groups of digits ranging from 0 to 100 and represents the percentage of cyan, magenta, yellow and black present in the main color.Color keywords are case-insensitive identifiers that represent a specific color, such as red, blue, black, or lightseagreen.
HSL code consists of 3 groups: a first in degree determining the color hue (between 0° and 360°) followed by 2 digits ranging from 0 to 255 and expressed as a percentage, respectively, determine the saturation and brightness of color. The theoretical maximum number is also ~ 16M colors. RGB code consists of 3 groups ranging from 0 to 255 and representing the primary colors: red, green, blue. The maximum number of colors in hexadecimal format is 256 x 256 x 256 = 16,777,216 What is a color RGB ? The HEX code consists of 3 groups of 2 digits from 00 to FF, representing the primary colors: red, green, blue. The CSS notation for use that color (ffff14) as shadow color is box-shadow:0 0 20px #ffff14 This is a box with a shadow color in hex #ffff14 Converting the hex color ffff14 in RGB, HSL and CMYK
The CSS notation for use that color (ffff14) as border color is border-color:#ffff14 This is a box with a border color in hex #ffff14 The CSS notation for use that color (ffff14) as background color is background-color:#ffff14 This is a box with a background color in hex #ffff14 The CSS notation for use that color (ffff14) as text color is color:#ffff14 This is an text example writing in hex color #ffff14. #ffff14 : Using the html color in a CSS style