Agenvix Enterprise Suite
Colour Science Studio

Color Converter HEX ⇄ RGB ⇄ HSL ⇄ OKLCH

Paste any CSS colour — hex, rgb(), hsl(), hwb() or a named colour — and get every format at once: HEX, RGB, HSL, HSV, HWB, CMYK and OKLCH, with WCAG contrast ratios, tints, shades and copy-ready CSS.

How It Works
7 Colour Models
WCAG Contrast
Tints & Shades
Zero Server Logs
Agenvix Studio v2.0
Colour ParsedsRGB • alpha 1
Input:
#d97706
HSL / OKLCH:
hsl(32, 95%, 44%) • oklch(66.6% 0.157 58.3)
Contrast:
3.19:1 on white • 6.58:1 on black
● Named: noneCMYK 0 45 97 15
Quick Test Presets:Click to load
Named: none
100% Free

Colour Conversion Workspace

Type a colour in any CSS syntax or use the picker. Every format, the contrast check and the palette update live.

On white
3.19:1
AA ✗AAA ✗Large ✓
On black
6.59:1
AA ✓AAA ✗Large ✓
Named
—
Luminance
0.280
Hue
32°
Tints (click to copy)
Shades (click to copy)
CSS custom properties
:root {
  --color-hex: #d97706;
  --color-rgb: rgb(217 119 6);
  --color-hsl: hsl(32, 95%, 44%);
  --color-hwb: hwb(32 2% 15%);
  --color-oklch: oklch(66.6% 0.157 58.3);
}

Why Designers Use the Agenvix Color Converter

One input, every output, including the modern formats most converters skip.

Every Format at Once

HEX (6 and 8 digit), legacy and modern rgb(), hsl(), hsv, hwb(), print CMYK and perceptual OKLCH from a single input.

Accessibility Built In

WCAG 2.x contrast ratios against white and black with AA and AAA pass marks for normal and large text.

Instant Palette

Five tints and five shades of the current colour, each copyable as hex, for hover states, borders and backgrounds.

Lenient Parser

Accepts hex without #, percentages, space-separated modern syntax, slash alpha, deg/turn hues and all 148 CSS named colours.

Simple as 1-2-3

How the Color Converter Works

Three steps from any colour string to the format you need.

01

Enter a Colour

Paste #d97706, rgb(217 119 6), hsl(32 95% 44%), hwb(…), tomato or use the native colour picker and alpha slider.

02

Read Every Format

The colour is normalised to sRGB and converted to HEX, RGB, HSL, HSV, HWB, CMYK and OKLCH with correct rounding.

03

Copy What You Need

Click any format to copy it, or copy the full CSS custom-property block for your design tokens.

Colour Model Reference

Colour Models Explained

When each representation is the right one to use.

Feature / SpecificationBest Use CaseEngine / Output StandardPrivacy & SecurityPerformance RatingAction
HEXCSS, design tools, quick sharing#RRGGBB / #RRGGBBAAsRGBUniversal
RGB / RGBACanvas, JavaScript, legacy CSSrgb(r g b / a)sRGBUniversal
HSLAdjusting lightness & saturation in CSShsl(h s% l%)sRGBIntuitive
HSV / HSBPhotoshop, Figma colour pickershsv(h s% v%)Not CSSDesign tools
HWBHuman-friendly whiteness/blacknesshwb(h w% b%) — CSS Color 4sRGBModern
OKLCHPerceptually uniform palettesoklch(L% C H) — CSS Color 4Wide gamutRecommended
CMYKPrint approximationNaive conversion, no ICC profileApproximateReference
Comprehensive Design Guide

Colour Formats for the Modern Web

1. HEX, RGB and alpha

HEX and RGB describe the same sRGB values: each pair of hex digits is one channel from 0 to 255. Eight-digit hex adds an alpha channel, so #d9770680 equals rgb(217 119 6 / 0.5). Modern CSS prefers the space-separated syntax with a slash for alpha, but the comma form remains valid everywhere.

2. HSL, HSV and HWB: human-friendly models

These models rearrange RGB around a hue wheel so you can reason about a colour instead of its channel mixture.

  • HSL lightness runs from black through the pure hue to white; ideal for hover and disabled variants in CSS.
  • HSV (Figma and Photoshop call it HSB) treats value as brightness, so 100% value can still be a saturated colour.
  • HWB describes how much white and black is mixed into a hue, which matches how people describe paint.

3. Why OKLCH is replacing HSL

HSL lightness is not perceptual: hsl(60 100% 50%) yellow looks far brighter than hsl(240 100% 50%) blue. OKLCH fixes this with a lightness axis that matches human perception, so palettes built by stepping L stay visually even and keeping C and H constant while changing L produces consistent tints. It is supported in every modern browser and can express wide-gamut Display P3 colours that sRGB hex cannot.

4. Contrast ratios and WCAG

WCAG 2.x contrast is computed from relative luminance, ranging from 1:1 to 21:1. Normal text needs 4.5:1 for AA and 7:1 for AAA; large text (18pt, or 14pt bold) and UI components need 3:1. The converter shows the ratio of the current colour against white and black so you can tell immediately whether it works as text on a light or dark background.

Frequently Asked Questions

Everything you need to know about colour conversion

Formats, precision, accessibility and print.

Which colour formats can I paste?

Hex with or without #, in 3, 4, 6 or 8 digits; rgb()/rgba() and hsl()/hsla() in comma or space syntax with optional slash alpha; hwb(); the keyword transparent; and all 148 CSS named colours such as tomato or rebeccapurple.

Why does converting back and forth change the last digit?

HSL and OKLCH values are rounded for display. Converting the rounded text back can land one unit away in RGB. Copy the hex value when you need an exact round trip.

Is the CMYK value accurate for print?

It is the standard naive formula without an ICC profile, which is what most online converters show. Real print conversion depends on the paper and press profile; use it as a starting point, not a specification.

What do the AA and AAA labels mean?

They are WCAG 2.x conformance levels for text contrast. AA requires 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1 respectively.

What is OKLCH and should I use it?

OKLCH is a perceptually uniform colour space available in CSS Color Level 4. Use it for generating palettes and themes because equal steps in lightness look equal to the eye, unlike HSL.

How are tints and shades generated?

Tints mix the colour with white and shades mix it with black in equal 15 percent steps. Click any swatch to copy its hex code.

Does alpha affect the contrast ratio?

The ratio is computed on the opaque colour. Semi-transparent text blends with its background, so measure the final rendered colour for strict compliance.

Is anything sent to a server?

No. All parsing and maths run in your browser.