canivete
    es

    TOOL · COLORS

    Color converter (HEX, RGB, HSL, OKLCH)

    Paste the color in any format — #d63327, rgb(), hsl() or oklch() — and take it ready in the other three, with a big swatch to check by eye.

    • HEX#d63327
    • RGBrgb(214, 51, 39)
    • HSLhsl(4, 69%, 50%)
    • OKLCHoklch(57.6% 0.201 29.1)

    Processed in your browser — your files never leave your computer.

    How it works

    1. Type or paste the color

      It takes #abc, #aabbcc, rgb(214 51 39), hsl(4 69% 50%) or oklch(57% 0.19 29) — with commas, spaces, with or without #. Conversion happens as you type.

    2. Check the swatch

      The big square shows the exact color you typed. Not the one you meant? Adjust the value and the swatch follows instantly.

    3. Copy the format you need

      Each format has its own copy button: HEX for design, RGB and HSL for classic CSS, OKLCH for modern CSS. One click and done.

    Frequently asked questions

    Which color formats does it accept?

    HEX with 3, 4, 6 or 8 digits (with or without #), rgb() and rgba(), hsl() and hsla(), and oklch() — with commas or spaces, just like CSS. The alpha channel is ignored in the conversion.

    What is OKLCH and why would I use it?

    OKLCH is the modern CSS color format: its L measures lightness the way the eye perceives it, so two colors with the same L look equally bright. That makes adjustments and scales far more predictable than HSL.

    Why does the converted OKLCH sometimes shift the color slightly?

    Not every OKLCH color exists on screen (the sRGB space is smaller). When a color falls outside, the tool reduces only the intensity (chroma) until it fits, preserving lightness and hue — the same thing CSS does.

    Is the conversion exact?

    Yes. HEX, RGB and HSL are direct mathematical conversions, and OKLCH uses the official formulas (Björn Ottosson, 2020), the same ones browsers use. Values are rounded only for display.

    Does it work offline?

    It does. Once the page loads, the conversion runs entirely in your browser — you can even turn off Wi-Fi.

    Is any color I type sent to a server?

    No. Everything happens inside your browser, on your device. No data leaves your computer.

    Other tools