Modified: 2025-01-13
List of main colors and their different values.
⚠️ Please disable Dark Reader on this page!
OKLCH is a modern CSS color function that defines colors using three perceptually uniform components: Lightness (L), Chroma (C), and Hue (H) within the Oklab color space. It is designed to align closely with how humans perceive color, offering more consistent and predictable results compared to older models like HSL or sRGB. Lightness ranges from 0% (black) to 100% (white), representing perceived brightness , while Chroma controls the vividness or intensity of the color, typically ranging from 0 (gray) to about 0.5 in practice. Hue is measured in degrees from 0° to 360°, defining the color’s position on the color wheel, such as red at 0°, blue at 240°, and purple at 320°.
One of the key advantages of OKLCH is its perceptual uniformity—changes in values correspond directly to how the human eye perceives color shifts, avoiding issues like unexpected gray tones in gradients that can occur with other models. It supports a wider color gamut, including Display P3 colors, which allows for more vibrant and accurate representation on modern displays. Unlike the older LCH color space, OKLCH avoids undesirable hue shifts when adjusting lightness or chroma, making it ideal for creating consistent color palettes and smooth transitions.
OKLCH is part of the CSS Color Module Level 4 specification and is supported in modern browsers like Chrome, Edge, Firefox, and Safari since May 2023. It can be used with relative color syntax, allowing developers to modify existing colors dynamically using the from keyword, and supports transparency via an optional alpha channel. For example, oklch(70% 0.15 240) defines a soft blue, and oklch(60% 0.2 280 / 75%) creates a vibrant purple with 75% opacity.
The rainbow has no definite number of physical colours, but seven are traditionally listed. Below is a commonly used list of seven colors in the order seen in a rainbow. Computer screens cannot show them precisely but can make colors that look similar.
The Rainbow colors are: Red, Orange, Yellow, Green, Blue, Indigo, Violet.
Variant
Simplified
FF is number written in hex mode. That number represent 255 in decimal. For example, if you want 42% to calculate you need to find 42% of numbeer 255 and convert that number to hex. 255 * 0.42 ~= 107 107 to hex is 6B. -- maleta (2016-12-27 10:32:28Z, License: CC BY-SA 3.0), source
Various links to useful resources.