How do I convert between color formats?
Choose the input format, paste into New Color, then choose the output format. The field reformats for copying between any supported formats, including OKLCH to HEX.
Loading…
Color picker guide
Choose colors with two perceptual, OKLab-based editing models: OKLrCH for lightness, chroma, and hue, or OKHSV for familiar saturation and value controls. Copy the result as HEX, RGB, HSL, OKLCH, or raw component values. The picker supports alpha transparency and creates sRGB fallbacks for out-of-gamut colors. Color processing happens locally in your browser.
The format menu controls how New Color is parsed and how the current color is copied. Switching formats changes its text representation, not the color or its OKLrCH or OKHSV editing controls.
Uses modern space-separated RGB and HSL by default. Provides comma-separated legacy variants for compatibility with older code and tools.
#eb827bcc
oklch(72% 0.13 65 / 80%)
rgb(177 169 58 / 80%)
Modern
rgb(177, 169, 58, 80%)
Legacy
hsl(122.6 35.8% 57.8% / 80%)
Modern
hsl(122.6, 35.8%, 57.8%, 80%)
Legacy
Raw formats are useful in source code, graphics APIs, shaders, and color calculations.
0xCC00BEAF
34, 181, 225, 204
0.4879, 0.6354, 0.9651, 0.8
0.4769, 0.273, 0.7889, 0.8
0.72, 0.13, 345.0, 0.8
OKLab models perceived lightness, chroma, and hue more closely than RGB-derived HSV, reducing unexpected shifts in apparent lightness while editing. It uses a lightness axis (L) and two opponent-color axes (a and b). Björn Ottosson derived the model in A perceptual color space for image processing.
OKLCH describes the same OKLab colors with cylindrical coordinates. L remains lightness, C is the distance from the neutral axis, and H is its angle. This makes chroma and hue direct controls; converting between OKLab and OKLCH changes only the coordinates. The tradeoff is an irregular sRGB boundary: some combinations of lightness, chroma, and hue fall outside it.
OKHSV remaps that boundary into an HSV-like cylinder, keeping every control combination in sRGB and maximum saturation at the edge. The familiar shape sacrifices some perceptual uniformity, but hue tracks perception better than in regular HSV. OKHSV is an editing model, not a CSS format. Ottosson derived it alongside OKHSL in Two new color spaces for color picking.
OKLab has no reference white, making it scale independent across dynamic ranges but less accurate for a fixed-range color picker. OKLrCH instead uses the Lr estimate proposed by OKLab's author, which follows CIELab lightness more closely and improves control over dark colors without changing chroma or hue.
OKLrCH is only an editing model. Before output, the
picker converts Lr back to standard OKLCH
lightness, so CSS oklch() values remain standard.
Switching to OKHSV changes the controls, not the output format.
OKLCH can describe colors that the picker's sRGB preview and output cannot represent. Clamping red, green, and blue separately can cause large hue shifts, so the picker instead keeps hue fixed and reduces chroma only to the sRGB boundary. This follows the OKLab gamut-clipping method described by Ottosson. Colors changed this way are marked fallback.
Because the renderer and gamut mapping assume sRGB, the picker does not account for wider display gamuts such as Display P3 or Adobe RGB. On these displays, the preview may appear more vivid than intended.
Enter exact values or use arrow keys and Vim-style movement for repeatable adjustments; hold Shift for larger steps. Number shortcuts focus pickers and sliders, while C copies the color. Hardware acceleration keeps the high-resolution controls responsive.
OKLCH Color Picker is also available as a native command-line application for conversions in scripts and terminal workflows.
It also powers the OKLCH Color Picker plugin for Neovim, so colors can be selected without leaving the editor.
Choose the input format, paste into New Color, then choose the output format. The field reformats for copying between any supported formats, including OKLCH to HEX.
The picker maps them to an sRGB fallback that preserves hue and as much chroma as possible. The preview and copied output use that fallback.
Yes. Alpha can be adjusted with its own slider and included in CSS colors, hexadecimal colors, literals, and raw component values.
Yes. WebAssembly processes colors in your browser after the assets load. Entered colors are not sent to a server.