Pick colors and convert between HEX, RGB, HSL, and HSV formats. Includes color palette generator, contrast checker, and CSS code export. Free online tool.
Pick a colour with the saturation/value square, the RGB sliders or the colour wheel, and every format updates at once with a copy button beside each one. Nothing is uploaded and nothing is processed remotely — the conversions are arithmetic running in your browser, so the tool works offline once the page has loaded, and the colours you save stay in your own browser’s local storage.
The panel gives you three things beyond a raw colour value: a harmony generator that builds a related set from the colour you chose, a contrast section that scores text-and-background pairs against the WCAG ratios, and a shareable link that encodes your current colour in the URL so you can send the exact swatch to someone else.
| Format | Example shape | What it is good for |
|---|---|---|
| HEX | #3B82F6 | The default in CSS, design tools and brand guidelines |
| RGB | rgb(59, 130, 246) | Anywhere you need the channels as numbers |
| RGBA | rgba(59, 130, 246, 0.5) | The same with an alpha channel |
| HSL | hsl(217, 91%, 60%) | Building shades and tints by adjusting one number |
| HSLA | hsla(217, 91%, 60%, 0.5) | HSL with alpha |
| HSV | hsv(217, 76%, 96%) | Matches how the square picker works; common in graphics apps |
| CMYK | cmyk(76%, 47%, 0%, 4%) | A rough conversion for print work |
| HWB | hwb(217 23% 4%) | “Hue plus this much white and black”, supported in modern CSS |
Every box is a live output with a copy button; you set the colour with the picker controls rather than by typing into these fields. To start from a specific colour you already have, append it to the page address as ?color=%233B82F6 — a six-digit or three-digit hex is accepted — and the picker will load on that colour. That is also what the Share Color button produces, so a link carries the exact value, the opacity and the harmony type you had selected.
There is no eyedropper for sampling a colour from your screen and no image upload for pulling a palette out of a photograph. It picks and converts colours; it does not extract them from other material. There is also no named-colour lookup, and the CMYK figures use the plain arithmetic conversion, which is fine for a first approximation but is not colour-managed — see the print note below.
This is the practical reason to care about formats at all. Hex and RGB describe a colour as three independent light channels. HSL describes it as three properties a person can reason about:
Suppose you need a hover state 10% darker than #3B82F6. In hex there is no obvious move: you would guess at the digits, check it, and guess again, and whatever you land on will probably have drifted in hue as well as darkness. In HSL the same colour is hsl(217, 91%, 60%) and the answer is simply hsl(217, 91%, 50%). The hue and saturation are untouched, so the darker version is unmistakably the same colour.
That property scales into a whole ramp. Fix the hue and saturation, vary only the lightness, and you get a set of steps that read as one family — the standard 50-to-900 scale in most design systems is built exactly this way. The Monochromatic harmony in this tool does it for you: it holds hue and saturation and produces five steps at the current lightness plus and minus 15 and 30 percentage points, clamped at 0 and 100. That is a usable base ramp in one click, and the individual swatches are clickable so you can take any step and keep working from it.
Two things to know when you build ramps this way. First, equal steps in lightness are not equal steps in perceived brightness — HSL is a simple transform of RGB and takes no account of how human vision responds, so the yellow end of a scale will look lighter than the blue end at the same nominal lightness. Adjust by eye at the extremes. Second, dropping lightness towards 0 or raising it towards 100 flattens saturation differences, so the darkest and lightest steps of two different hues converge; if the near-black step needs to still read as blue, back the lightness off and let saturation carry it.
The manipulation buttons apply exactly these moves in HSL and hand the result back as the current colour, so you can chain them:
Hex and RGB are the same information written differently. #3B82F6 is 3B, 82, F6 in hexadecimal, which is 59, 130 and 246 in decimal — a lossless, reversible pair. Three-digit hex such as #39F is shorthand in which each digit is doubled, so it expands to #3399FF; it can only express 4,096 of the 16.7 million values, which is why the tool always outputs the six-digit form.
HSL and HSV are also derived from RGB, but they round on the way out: the hue is reported as a whole number of degrees, saturation and lightness as whole percentages. Round-tripping RGB to HSL and back can therefore land you one or two units off on a channel — invisible on screen, but worth knowing if you are diffing values or writing tests. Keep one format as the source of truth in your codebase rather than converting back and forth in both directions.
CMYK is the conversion to treat with real caution. The arithmetic here is the standard naive formula, and it takes no account of the ink set, paper stock or colour profile a printer will actually use. Vivid screen colours — saturated blues, greens and oranges in particular — simply lie outside what four-colour process printing can reproduce, and no conversion formula can change that. Use the CMYK output to communicate roughly what you want, and let the print supplier convert properly with the profile for the job.
HWB expresses the same colour as a hue with a percentage of white and a percentage of black mixed in. It maps closely to how people describe paint, and it is a genuinely nice way to reason about tints and shades if your target supports it.
The opacity slider runs from 0% (fully transparent) to 100% (fully opaque) and feeds the alpha value in the RGBA and HSLA outputs, where it appears as a decimal from 0 to 1 — 50% opacity becomes 0.5. Alpha is not part of the colour; it is an instruction about how to blend the colour with whatever is behind it. Consequences worth planning around:
rgba(59, 130, 246, 0.4) looks like one colour over white and a different one over a dark background, which is why it cannot be reduced to a single hex.Alpha is preserved in saved colours and in the shareable link, so a swatch you send keeps the opacity you set.
The contrast section takes the current harmony set and scores real text-and-background pairs. Every colour is tested with white text and with black text, and colours from the set are also tested against each other — those pairings are only shown when they clear 3:1, so the list does not fill with combinations nobody should ship. Each row is rendered as actual type, with a font selector, because a ratio on its own does not tell you whether something is comfortable to read.
The thresholds are the published WCAG 2 ones, computed from relative luminance:
| Ratio | What it satisfies |
|---|---|
| 3:1 | AA for large text, and the minimum for user interface components and graphical objects |
| 4.5:1 | AA for normal body text; also AAA for large text |
| 7:1 | AAA for normal body text |
“Large” means at least 18 point, or 14 point bold, or the pixel equivalents. Practical guidance that follows from the maths rather than from taste:
The harmony generator rotates the hue around the wheel while holding saturation and lightness, producing seven schemes: complementary (opposite, 180 degrees), analogous (neighbouring hues either side), triadic (three hues 120 degrees apart), tetradic and square (four-colour arrangements), split-complementary (the two hues flanking the complement, which keeps the contrast without the harshness of a straight opposite), and monochromatic (the lightness ramp described above). Any swatch in the generated set is clickable and becomes the new working colour, so a harmony is a jumping-off point rather than a fixed output. The colour wheel shows where the current hue and the generated set sit relative to each other, which makes the geometry of each scheme immediately obvious.
Saved colours are kept in your browser’s local storage: they persist across visits on that browser, are not synced to any account or other device, and disappear if you clear site data. For anything you need to keep, copy the values out or use the shareable link, which encodes the colour, the opacity and the harmony type in the URL and requires no storage at all.
A color picker is an essential design and development tool that allows users to select, convert, and explore colors across multiple color models. Whether you are designing a website, creating brand guidelines, or debugging CSS, a color picker provides instant access to color values in formats like HEX, RGB, HSL, and CMYK.
Colors on the web are represented as numeric values. The most common format is HEX (hexadecimal), a six-character code preceded by a hash symbol—such as #FF5733 for a vivid red-orange. RGB (Red, Green, Blue) represents colors as three integer values from 0 to 255. HSL (Hue, Saturation, Lightness) offers a more intuitive model based on a color wheel. Understanding these models is critical for web accessibility, branding consistency, and cross-platform rendering.
| Model | Format | Example | Best For |
|---|---|---|---|
| HEX | #RRGGBB | #3498DB | CSS, HTML, design specs |
| RGB | rgb(R, G, B) | rgb(52, 152, 219) | Screen display, JavaScript |
| HSL | hsl(H, S%, L%) | hsl(204, 70%, 53%) | Intuitive color adjustments |
| CMYK | C, M, Y, K% | 76%, 31%, 0%, 14% | Print media |
HEX codes are shorthand for RGB values expressed in base-16. Each pair of characters represents one channel: red, green, and blue. HSL separates hue (the color angle on a 360-degree wheel) from saturation and lightness, making it easier to create consistent color palettes by adjusting a single parameter.
What are the different color models (HEX, RGB, HSL, HSV) and when should I use each?
HEX (#RRGGBB) is most common for web CSS - compact format like #3498db.
RGB (0-255 values) is best for transparency with rgba() and programmatic manipulation.
HSL (hue 0-360°, saturation %, lightness %) is ideal for creating color variations and tints/shades - easy to adjust lightness while keeping hue.
HSV (hue, saturation, value) is similar to HSL but used in color pickers and design tools.
Use HEX for solid colors, RGBA for transparency, HSL for design systems and programmatic color adjustments.
This tool converts between all formats instantly.
How do I create accessible color combinations that meet WCAG standards?
WCAG requires minimum contrast ratios:
Level AA needs 4.5:1 for normal text (<18pt) and 3:1 for large text.
Level AAA requires 7:1 and 4.5:1 respectively.
Black on white (#000000 on #FFFFFF) provides 21:1 (perfect).
Test with WebAIM Contrast Checker or Chrome DevTools.
Common mistakes:
Always verify actual rendered colors, especially with transparency.
Consider color blindness - don't rely on color alone, use icons and labels too.
This tool shows contrast ratios and WCAG compliance.
How do I extract and generate color palettes from images?
Upload images to extract dominant colors using algorithms that analyze pixel frequency and identify the most common hues (typically 5-10 colors).
Use for brand color extraction from logos, website theming from hero images, or data visualization colors.
Create full palettes by identifying the primary color, generating tints (add white) and shades (add black), then adding complementary colors.
Tools:
Adobe Color, Coolors, or this color picker.
Ensure extracted colors meet accessibility standards and test in context before using in production designs.
Use HEX (#3498db) for solid colors - most common and compact.
Use RGBA (rgba(52,152,219,0.8)) for transparency.
Use HSL (hsl(204,70%,53%)) for design systems and creating color variations - easy to adjust lightness for hover states.
CSS custom properties (--primary: #3498db) enable centralized color management and dark mode theming.
Modern formats: HWB and LCH offer perceptual uniformity but have limited browser support.
Best practice: combine CSS variables with HSL for maximum flexibility and maintainability.
This tool outputs all formats for immediate use.
How do I implement dark mode with color management?
Use CSS custom properties to define theme colors.
Don't use pure black (#000000) - use #121212 or #1A1A1A for backgrounds (reduces eye strain, better for OLED).
Desaturate accent colors by 10-20% for dark mode.
Use @media (prefers-color-scheme: dark) for OS-based preference or data-theme attribute for user toggle.
Example: light mode hsl(204, 70%, 53%) becomes hsl(204, 50%, 63%) in dark mode.
Text should use #E0E0E0 not pure white.
Surface elevation shown through brightness gradients, not shadows.
Always test contrast ratios in both modes.
What is the difference between additive (RGB) and subtractive (CMYK) color mixing?
RGB (additive) is for screens - adds light (R+G+B=white).
CMYK (subtractive) is for printing - adds ink that absorbs light (C+M+Y+K=black).
RGB has wider color gamut (more vivid colors).
CMYK is smaller gamut - some RGB colors are unprintable.
For web: use RGB/HEX/HSL exclusively.
For print: convert to CMYK and request proof prints.
Bright blues and greens often show "out of gamut" warnings when converting RGB to CMYK.
This color picker works in RGB for screen use but helps understand conversion concepts.
How do I use color psychology and theory in web design?
Colors evoke psychological responses:
Blue conveys trust/professionalism (finance, healthcare, tech - Facebook, PayPal).
Red signals energy/urgency (CTAs, sales - Netflix, YouTube).
Green represents growth/health (wellness, environmental - Starbucks).
Orange shows enthusiasm/creativity (startups - Amazon).
Purple suggests luxury (cosmetics - Twitch).
Consider cultural context:
red = luck in China but danger in West.
Use complementary colors (opposites) for high contrast CTAs.
Analogous colors (adjacent) create harmonious designs.
Limit to 3-5 primary colors.
A/B test effectiveness.
Don't rely on color alone - ensure accessibility with icons and labels.
How do I optimize color performance and loading for web applications?
All color formats (HEX, RGB, HSL) have equal performance - browsers convert to internal RGB.
Use shorthand HEX (#FFF vs #FFFFFF) to save bytes.
Minify CSS for 20-30% size reduction.
Use CSS variables for theming - minimal overhead, updates all elements instantly.
Prefer CSS gradients over images (0 bytes vs 10-50KB).
Pre-calculate colors at build time rather than runtime.
For images:
Inline critical colors (<14KB) to prevent FOUC.
Debounce theme changes for better perceived performance.