JustUtils

Color converter

Paste a color to see its HEX, RGB, HSL, HSV and OKLCH values together. Copy a value for your project or check how the color reads as text. All conversions run in your browser.

Paste HEX, RGB, HSL, HSV, OKLCH or a CSS color name.

Text contrast

Aa

6.00∶1

Passes AA for normal and large text.

HEX#336699
RGBrgb(51 102 153)
HSLhsl(210 50% 40%)
HSVhsv(210 66.667% 60%)
OKLCHoklch(49.931% 0.098664 250.433)

How do you convert HEX to RGB?

Split the six HEX digits into red, green and blue pairs. In #336699, hexadecimal 33 equals 3 × 16 + 3 = 51. The other pairs give 102 and 153, so #336699 equals rgb(51 102 153), or hsl(210 50% 40%). The shorthand #369 doubles each digit to give the same color.

What do the last two digits of eight-digit HEX mean?

In #RRGGBBAA, AA encodes opacity from 00 (transparent) to FF (opaque). For #33669980, 80 is 128 in decimal, so opacity is 128/255, about 50.2%. HEX rounds opacity to the nearest byte. RGB and HSL can express 50% directly. CSS Color 4

How is text contrast calculated?

The converter blends a transparent foreground over your chosen background in sRGB, then compares their relative luminance. WCAG AA requires 4.5∶1 for normal text and 3∶1 for large text (18 pt regular or 14 pt bold). The verdict uses the unrounded ratio. WCAG 2.2

HSV is a design-tool notation. For a CSS declaration, copy HEX, RGB, HSL or OKLCH. All results describe the sRGB preview, including when a wide-gamut input needs clipping.