Toollit

Color Converter

Convert between HEX, RGB, HSL, OKLCH and other color formats in real-time.

Understanding CSS Color Formats

There are several ways to represent colors on the web. The most widely used HEX is a hexadecimal code like #3b82f6, which is concise but hard to intuitively understand. RGB defines colors by the mixing ratio of red, green, and blue light (0-255), closest to how displays actually emit light.

HSL divides colors into Hue, Saturation, and Lightness, which is closer to human color perception. However, it has the drawback of non-uniform brightness perception, which led to OKLCH. OKLCH is a perceptually uniform color space based on human visual perception, adopted by Tailwind CSS v4 and the latest CSS specifications.

HEX

Hexadecimal color code. #RRGGBB format

RGB

Red, green, blue channels. Each 0-255 range

HSL

Hue, saturation, lightness. Intuitive for color manipulation

OKLCH

Perceptually uniform color space. CSS Color Level 4 standard