Pixab AI
Files never leave your browserInstant processing100% free, no signupWorks offline after first load

Color Picker & Converter — HEX, RGB, HSL, CMYK

Pick any color and instantly convert it to HEX, RGB, RGBA, HSL, HSLA, CMYK, CSS name and Tailwind class. See shades, tints, complementary and analogous colors with WCAG contrast checking.

HEX#6366F1
HEX8#6366F1FF
RGBrgb(99, 102, 241)
RGBArgba(99, 102, 241, 1)
HSLhsl(239, 84%, 67%)
HSLAhsla(239, 84%, 67%, 1)
HSBhsb(239, 59%, 95%)
CMYKcmyk(59%, 58%, 0%, 5%)
Tailwindindigo-500
MaterialDeep Purple 500

Paste any color format

WCAG Accessibility

FAILAA on white4.47:1
FAILAAA on white4.47:1
PASSAA on black4.70:1
FAILAAA on black4.70:1

Shades (white → color → black)

Tints (color → white)

Color Harmonies

Complementary

Analogous (±30° / ±60°)

Triadic (+120° / +240°)

How it works

  1. 1Click "Pick Color" to open the native color chooser, or drag the slider to adjust alpha transparency.
  2. 2All format values update live — HEX, RGB, RGBA, HSL, HSLA, HSB, CMYK, CSS name, Tailwind and Material.
  3. 3Click any copy icon to copy that format to clipboard.
  4. 4Paste any color format into the input box and press Convert to see all representations.
  5. 5Check the WCAG section to see if your color passes accessibility contrast ratios on white and black.
  6. 6Click any swatch in the shades, tints, or harmony rows to copy its HEX code.

Frequently asked questions

Color Formats Explained: HEX vs RGB vs HSL vs CMYK

Every color you see on a screen or in print can be described in multiple ways. Each format serves a different purpose and is used in different contexts. Understanding when to use each format is essential for designers, developers, and anyone working with digital or print media.

HEX (Hexadecimal). The most common format for web development. A hex color like #6366F1 encodes red, green, and blue channels as two-digit hexadecimal numbers (00–FF). Hex is compact, widely supported in HTML and CSS, and trivial to copy-paste into code. The shorthand form #RGB works when both digits in each pair are identical — so #FF0000 becomes #F00.

RGB (Red, Green, Blue). The additive color model used by screens. Values range 0–255 for each channel. rgb(255, 0, 0) is pure red. RGB is intuitive for screen work because it mirrors how monitors produce color by mixing light. The RGBA variant adds an alpha channel (0–1) for transparency.

HSL (Hue, Saturation, Lightness). A human-friendly model where Hue is the color angle (0–360°), Saturation controls colour intensity (0–100%), and Lightness controls brightness (0–100%). HSL is excellent for programmatic color manipulation — rotating hue by 180° gives the complementary color, and adjusting lightness creates tints and shades without changing the base color. This makes HSL ideal for generating color scales and themes in CSS.

HSB/HSV (Hue, Saturation, Brightness/Value). Similar to HSL but uses Brightness (0–100%) instead of Lightness. Unlike HSL where pure white is L=100%, in HSB pure white requires S=0, B=100%. HSB is common in design tools like Adobe Photoshop and Figma because it maps more intuitively to how artists think about color.

CMYK (Cyan, Magenta, Yellow, Key/Black). The subtractive color model used in print. Where screens add light to create color, printers subtract it by layering ink. CMYK values are percentages (0–100%) for each ink. If you are sending designs to a commercial printer, your colors must be in CMYK — RGB colors look different when printed. Our tool shows the CMYK equivalent for any color you pick, allowing you to verify print accuracy before sending files.

The HEX8 format adds two digits for the alpha channel — for example #6366F1FF(fully opaque) or #6366F180 (50% transparent). This is used in some CSS contexts and design tools that support 8-digit hex codes.

Tailwind CSS Color Classes — How Matching Works

Tailwind CSS ships with a comprehensive color palette of 22 color families, each with 11 shades from 50 (very light) to 950 (very dark). When you pick a color in this tool, we find the closest Tailwind class by measuring the perceptual distance in CIE LAB color space — the same color model used by the human visual system. This gives more accurate results than simple Euclidean distance in RGB space, which does not reflect how different colors look to the human eye.

For example, if you pick #6366F1, the tool identifies it as closest to indigo-500 in Tailwind. You can use this immediately in your markup:

<div class="bg-indigo-500 text-white px-4 py-2 rounded">
  Button
</div>

Tailwind colors are designed to be used together — lighter shades for backgrounds, mid shades for elements, and darker shades for text. The -100 to -300 range works well for backgrounds, -400 to -600 for interactive elements, and -700 to -900 for text.

Note that the "closest match" is an approximation — exact custom colors should be defined in your tailwind.config.js under theme.extend.colors if the nearest Tailwind shade is not precise enough. Our CSS Gradient Generator can help you create gradient utilities for Tailwind as well.

Color Theory Basics: Complementary, Analogous, and Triadic

The color wheel is the foundation of color theory. Colors that work harmoniously together follow predictable mathematical relationships on the wheel. Our tool calculates three standard harmony types for any color you pick:

Complementary colors sit directly opposite each other on the color wheel — 180° apart. They create high contrast and visual tension when used together, making them effective for call-to-action buttons, error states, and emphasis. The complementary of blue is orange; the complementary of red is cyan.

Analogous colors are adjacent on the color wheel — typically ±30° and ±60° from the base color. They create harmonious, low-tension palettes that feel cohesive. Analogous schemes are common in nature (think autumn foliage) and work well for backgrounds, illustrations, and brands that want a calm, unified appearance.

Triadic colors are three colors evenly spaced 120° apart on the wheel. They offer strong visual contrast while still feeling balanced — unlike complementary pairs which can feel harsh. Primary colors (red, blue, yellow) form a triadic scheme. Triadic palettes work well for bold brand identities and children's products.

You can use these harmony swatches directly as brand accent colors, or feed them into our Color Palette Extractor to build a complete palette around your chosen base.

WCAG Color Accessibility — What AA and AAA Mean

The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios between text color and background color to ensure readability for people with low vision or color deficiency. Our tool checks your picked color against both white and black backgrounds.

WCAG AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt+ bold). This is the minimum required for legal compliance in most accessibility standards including EN 301 549 in Europe and Section 508 in the United States.

WCAG AAA requires 7:1 for normal text and 4.5:1 for large text. This is the enhanced level — recommended for body text and critical content, but not always achievable for all color combinations without sacrificing design goals.

Contrast ratio is calculated as (L1 + 0.05) / (L2 + 0.05) where L1 and L2 are the relative luminances of the two colors. Pure black on white gives a ratio of 21:1 (maximum). Pure white on white gives 1:1 (minimum). Most usable text colors fall between 4.5:1 and 21:1.

A common pitfall is choosing a mid-tone color that fails both on white and black backgrounds. In this case, you need to either darken the color for use on white, or lighten it for use on dark backgrounds. Our shades row makes it easy to find accessible alternatives.

Frequently Asked Questions

How do I convert HEX to RGB?

Split the hex code into three pairs of characters after the # sign. Convert each pair from base-16 (hexadecimal) to base-10. For example, #FF6347 → FF=255, 63=99, 47=71 → rgb(255, 99, 71). Our tool does this automatically for any color you pick.

What is the difference between HSL and HSB?

Both use Hue and Saturation, but the third component differs. HSL uses Lightness where 50% is a pure, vivid color and 100% is white. HSB uses Brightness where 100% is the pure, vivid color. HSB is used in Photoshop and Figma; HSL is used in CSS. The conversion between them requires a formula — our tool shows both formats simultaneously.

Why does my color fail WCAG AA on both white and black?

Mid-tone colors (roughly 30–60% lightness in HSL) often have insufficient contrast against both extremes. To fix this: for use on white backgrounds, darken the color until the ratio hits 4.5:1. For use on dark backgrounds, lighten it. Use our shades row — the darker shades typically pass on white, and the lighter shades on dark backgrounds.

What does the CSS name field show?

CSS has 147 officially named colors — words like "rebeccapurple", "tomato", "hotpink" that you can use directly in CSS instead of hex codes. If the color you pick is exactly or very close to a named CSS color, this field shows the name. Most custom colors will not have a CSS name.

How accurate is the Tailwind and Material closest match?

We measure perceptual distance in CIELAB color space, which approximates how the human eye perceives color differences. The result is the closest official palette entry — but for exact brand colors, define them in your Tailwind config or Material theme rather than relying on the closest named shade.

Can I enter any color format to convert it?

Yes. The "Paste any color format" input accepts HEX (#FF0000), short HEX (#F00), rgb(), rgba(), hsl(), hsla(), color names like "tomato" or "rebeccapurple", and more. Just type or paste the value and press Convert or hit Enter.

Are colors processed in the browser or on a server?

Everything runs in your browser using the chroma.js library. No color data is sent to any server. This means conversions are instant, work offline, and are completely private.

Keep going