Color Converter & Picker

HEX#6366f1
RGBrgb(99, 102, 241)
RGBArgba(99, 102, 241, 1)
HSLhsl(239, 84%, 67%)
HSLAhsla(239, 84%, 67%, 1)
HSVhsv(239, 59%, 95%)
OKLCHoklch(0.5854 0.2041 277.12)

Color palette

Complementary
Analogous
Triadic

Contrast checker (WCAG)

Sample text
17.74contrast ratio
Normal AA
Normal AAA
Large AA
Large AAA

What Is a Color Converter?

The Color Converter is a complete toolkit for designers and front-end developers. Paste a color in any common format — HEX, RGB, RGBA, HSL, HSLA, HSV/HSB or the modern OKLCH — or pick one visually, and every other format updates instantly with a one-click copy button. Beyond conversion it generates a harmonious palette (complementary, analogous and triadic colors) from your base color, and includes a WCAG contrast checker so you can verify text remains accessible against any background. Everything runs in your browser, so it is fast, private and always available.

Colours on screens are defined by numbers, but those numbers can be written in several formats — HEX (#ff6b35), RGB (255, 107, 53), HSL (18°, 100%, 60%) and more. Each format is preferred in a different context: web designers write HEX in CSS, front-end developers pick HSL to adjust lightness, and graphics tools often output RGB. A colour converter translates between all these formats instantly.

How to Use the Color Converter

  1. Use the color picker or type a value (e.g. #6366f1 or rgb(99,102,241)) into the input.
  2. Read every format in the list and copy any of them with its copy button.
  3. Explore the generated palette and use the contrast checker to test text against a background.

Use Cases

  • Converting a brand colour from HEX (as supplied by a designer) to HSL to tweak lightness or saturation in CSS.
  • Translating an RGB value from a graphics tool into a CSS-ready HEX string.
  • Checking what a colour value looks like visually while switching between formats for code.
  • Learning colour theory by seeing how the same colour is represented in different models.

How Colour Conversion Works

HEX is just RGB written in base 16: #ff6b35 means R=255 (0xff), G=107 (0x6b), B=53 (0x35). Converting HEX to RGB is therefore a base-16 to base-10 decode. Converting RGB to HSL is a formula: Hue is the angle on the colour wheel, Saturation is the intensity, and Lightness is how bright or dark. All arithmetic happens in a few lines of JavaScript with no external dependencies.

The tool renders a live preview of the colour so you can confirm the conversion is correct at a glance. This is especially useful when the same numerical value looks completely different between formats.

Benefits and Use Cases

  • Instantly convert between HEX, RGB, HSL, HSV and OKLCH without remembering any formulas.
  • Build accessible interfaces by checking WCAG AA/AAA contrast for normal and large text.
  • Generate complementary, analogous and triadic palettes to speed up your design work.

Privacy

All conversion runs in your browser. The colour values you enter are not sent to our servers. The tool works offline once the page has loaded.

FAQ

Which color formats are supported?

HEX, RGB, RGBA, HSL, HSLA, HSV/HSB and OKLCH. Paste any of them or use the visual picker, and all the others update instantly.

What is OKLCH?

OKLCH is a modern, perceptually uniform color space supported by CSS. It makes lightness and chroma adjustments look more natural than HSL.

How does the contrast checker work?

It computes the WCAG contrast ratio between two colors and shows whether they pass AA and AAA for normal and large text.

What is the difference between HSL and HSB/HSV?

HSL (Hue, Saturation, Lightness) and HSB/HSV (Hue, Saturation, Brightness/Value) are related but different. In HSL, 100% lightness is always white and 0% is always black; in HSB, 100% brightness with 100% saturation gives the pure hue. Graphics apps like Photoshop use HSB; CSS uses HSL.