How to convert a color
- Enter a HEX, RGB, HSL, HSV, OKLCH or CMYK value in the field above, or select an example.
- Compare the preview with the output values. All displayed values describe the resulting 8-bit sRGB color.
- Select Copy beside the format you want. If you need accessible text, check the exact foreground/background pair with a contrast checker.
HEX, RGB, HSL, HSV and CMYK: what is different?
HEX and RGB express the same sRGB channels for use on screens. HSL separates hue, saturation and lightness; HSV uses hue, saturation and value instead. HSV is useful in color controls but hsv() is not a CSS color function.
CMYK describes cyan, magenta, yellow and black components. This converter uses a simple mathematical approximation to and from sRGB; the result is not an ICC-profile-managed print separation or a print proof. For accurate printing, request a color-managed proof from your printer.
OKLCH organizes lightness, chroma and hue. Colors outside the sRGB gamut are mapped by reducing chroma, and the converter tells you when that happens.
HWB colors in CSS: hue, whiteness and blackness
hwb(210 20% 10%) uses a hue angle of 210°, 20% whiteness and 10% blackness. It corresponds to #338CE6 in 8-bit sRGB. Use space-separated values without commas; alpha values can be entered as HEX8 or rgb(42 109 244 / 50%).
When whiteness plus blackness reaches 100% or more, the color is gray and the hue has no visible effect. For example, hwb(45 40% 80%) becomes approximately #555555. You can copy the HWB result directly into a modern CSS property.
Worked color conversion example
#2A6DF4 corresponds to rgb(42, 109, 244). Try the sample, then compare the HSL, HSV and approximate CMYK values. Changing between models can introduce small rounding differences because the displayed HEX value uses 8-bit sRGB channels.
For more examples, browse the #2A6DF4 color profile, explore color palettes, or return to the color picker tool.