#6366F1Color Converter
AvailableConvert and inspect HEX, RGB, HSL and OKLCH colors locally, with gamut, luminance and contrast information.
Color input
Enter a HEX, RGB, HSL or OKLCH value. Press Enter or use Convert.
Supported: #RGB, #RGBA, #RRGGBB, #RRGGBBAA, rgb()/rgba(), hsl()/hsla() and oklch().
Preview
rgb(99 102 241)hsl(238.7 83.5% 66.7%)oklch(58.5% 0.204 277.1)Color inspection
Conversion and inspection run entirely in the browser. No color values are stored or sent to a Devary backend.
CSS color formats in one place
Move between familiar sRGB formats and OKLCH without sending design tokens or application colors to a backend.
Explicit sRGB gamut boundary
OKLCH can describe colors outside sRGB. When that happens, Color Converter preserves the OKLCH coordinates and clearly marks HEX, RGB and HSL as sRGB-clipped representations.
Developer guide
Convert CSS colors and inspect their actual values
Compare HEX, RGB, HSL and OKLCH representations, alpha channels, sRGB gamut and contrast without guessing from color swatches.
Practical workflow
Configure
Enter a supported CSS color such as #6366f1 or an HSL function, with valid channel ranges.
Try it
Convert the value and inspect the emitted formats; compare the preview against the intended UI component.
Check the result
Review alpha, gamut and contrast figures before deciding whether a color works on its actual background.
Worked examples
Convert HEX to RGB
The parsed sRGB channels are returned in modern CSS rgb() notation.
Configuration
Convert HEXExample input
#6366f1Expected result
rgb(99 102 241)Convert HSL red to HEX
A fully saturated red at zero degrees converts to the exact hexadecimal red code.
Configuration
Convert HSLExample input
hsl(0 100% 50%)Expected result
#FF0000Limits and safeguards
Supported scope
Only the documented HEX, RGB, HSL and OKLCH syntaxes are supported; arbitrary CSS color functions are not.
Before using in production
Out-of-gamut OKLCH colors may be clipped for sRGB display. Contrast numbers are measurements, not a complete accessibility audit.
Common question
Is the converted HEX always perceptually identical?
Not necessarily. Alpha compositing and sRGB gamut clipping can change the final appearance; review the target background and display.