Color Converter

Real-time conversion between HEX, RGB, RGBA, HSL and HSV, with a color picker, common palette and contrast preview — copy any color format with one click. Runs fully in your browser; nothing is uploaded.

Choose a color
Common palette (click to use)
Enter or pick a color and every format appears below in real time.
All formats (click any row to copy)
Contrast preview
White text · Aa sample text
Black text · Aa sample text
Contrast is based on WCAG relative luminance; body text reads clearly at 4.5 : 1 or above.

Three ways to describe the same colour

Every colour on a screen is ultimately three channel values, but there are three common notations, and each is better at a different job:

FormatExampleBest for
HEX#4f46e5Copy-paste between design tools and CSS; the most compact
RGB / RGBArgb(79 70 229)Programmatic manipulation and alpha blending
HSL / HSLAhsl(243 76% 59%)Building palettes by hand — see below

Why HSL is easier to reason about

HSL splits a colour into hue (0–360° around the wheel), saturation (0–100%, grey to vivid) and lightness (0–100%, black to white). That maps onto how designers actually work:

Doing the same in RGB means hand-solving for three channels at once, which is why palettes built in HSL tend to look more coherent.

Alpha, and the 8-digit hex

An extra pair of hex digits at the end encodes opacity: #4f46e580 is the brand colour at 50% alpha (80 = 128/255). The older rgba() form does the same with a decimal value. Beware that alpha blends with whatever is behind the element — an alpha colour over a dark background will not look like the same colour over a light one.

Contrast is part of the colour choice

A colour that looks fine in isolation can fail accessibility once it sits on a background. WCAG sets the bar at a contrast ratio of 4.5:1 for body text and 3:1 for large or bold text. Check any text/background pair before shipping — it is one of the cheapest accessibility wins available.

Related tools

Contrast checker Colour palette generator Gradient generator

FAQ

What is the difference between HEX and RGB?
They describe the same color in different notations. HEX uses hexadecimal digits, e.g. #4F46E5, while RGB uses three 0–255 components, e.g. rgb(79, 70, 229). This tool converts between them in real time.
What are HSL and HSV?
HSL describes a color by Hue, Saturation and Lightness, while HSV (also called HSB) uses Hue, Saturation and Value (Brightness). Both are closer to how humans perceive color than RGB, which makes them handier when adjusting palettes.
How do I keep text readable on this color?
Check the contrast. The tool computes the WCAG contrast ratio of the color against white and black text and gives a verdict. As a rule of thumb, body text is comfortably readable at 4.5 : 1 or above.
Is my data uploaded during conversion?
No. All color math runs locally in your browser and nothing is sent to a server.