Skip to content

Color Converter

Convert between HEX, RGB, HSL, CMYK, OKLCH and OKLab instantly. Paste any CSS color — even a name — and get every format plus the nearest Tailwind color.

HEX
Try:
Medium Slate Blue
#8B5CF6

All Formats

HEX#8B5CF6
RGBrgb(139, 92, 246)
HSLhsl(258, 90%, 66%)
HWBhwb(258 36% 4%)
CMYKcmyk(43%, 63%, 0%, 4%)
OKLCHoklch(60.6% 0.219 292.7)
OKLaboklab(60.6% 0.085 -0.202)
NameMedium Slate Blue

Nearest Tailwind v4 Color

violet-500

#8B5CF6 · exact match (ΔE 0.000)

BGbg-violet-500
TEXTtext-violet-500
VARvar(--color-violet-500)

CSS Usage

CSScolor: #8B5CF6;
BGbackground-color: #8B5CF6;
VAR--my-color: #8B5CF6;
OKLCH--my-color: oklch(60.6% 0.219 292.7);
TWtext-[#8B5CF6] bg-[#8B5CF6]

Free Color Format Converter

Convert colors between HEX, RGB, HSL, CMYK, OKLCH and OKLab formats instantly. Whether you need to convert a hex code from your design tool to RGB for CSS, or translate HSL values to hex for your brand guidelines — paste the value and get every format at once. Kulr detects the format automatically, including CSS named colors like "tomato" or "rebeccapurple".

HEX (e.g., #8B5CF6) is the most common format for web colors. RGB (e.g., rgb(139, 92, 246)) represents colors as red, green, and blue channels. HSL (e.g., hsl(262, 90%, 66%)) uses hue, saturation, and lightness — often easier for designers to reason about. CMYK is used for print design. OKLCH (e.g., oklch(60.6% 0.219 292.7)) is the modern, perceptually uniform CSS color space used by Tailwind CSS v4 — equal steps in lightness actually look equal.

Kulr also shows you the closest CSS named color, the nearest Tailwind CSS v4 utility class, ready-to-use CSS property declarations, CSS custom property syntax, and Tailwind CSS arbitrary value syntax. Everything runs in your browser — no data is sent anywhere.