Hex Color Code Picker
Recent colors
Colors you pick will appear here.
Chosen color
#3B82F6
Nearest CSS color: dodgerblue (#1E90FF)
- HEX
#3B82F6 - RGB
rgb(59, 130, 246) - HSL
hsl(217, 91%, 60%) - HSV
hsv(217°, 76%, 96%) - CMYK
cmyk(76%, 47%, 0%, 4%) - OKLCH
oklch(0.62 0.19 260)
Live palette
Make a palette from this color →Live shades
Build shades and tints →Contrast
Check this pair →White text
Sample text on this color
3.68:1 · Fail AA normal
Black text
Sample text on this color
5.71:1 · Pass AA normal
Pick a color, copy its code
Pick a color and the whole page follows it: the big swatch, all six codes, the palette strip, the shades strip, and the contrast check all update at once. The square, the hue slider, the opacity slider, and the HEX field are one picker, and one click copies HEX, RGB, HSL, HSV, CMYK, or OKLCH.
The default color is #3B82F6, a bright blue: rgb(59, 130, 246) and hsl(217, 91%, 60%). The page accent is that blue right now — buttons, links, and highlights wear it — and it changes the second you pick a new color. Beside the picker, the big swatch shows #3B82F6 large, its HEX code big beside it, plus a live palette strip, a live shades strip, and sample text on the blue with the AA verdict for white and for black.
Drag the dot across the square to change saturation and brightness, slide hue from 0 to 360 degrees, and slide opacity from 0 to 100 percent. Your last 16 colors stay in the recent strip, so a color you used five minutes ago is one click away. The Random button picks a new color from all 16,777,216 HEX colors.
Try it: Drag the dot and watch the swatch, the codes, the palette, the shades, and the accent color change together.
One color, every format
One color has six codes on this site: HEX, RGB, HSL, HSV, CMYK, and OKLCH. They all describe the same color, so picking a new color updates all six at once. HEX is the code websites use most, and HSL is the easiest to adjust by hand.
Take #3B82F6, the blue above. In RGB it is rgb(59, 130, 246): 59 red, 130 green, 246 blue, each from 0 to 255. In HSL it is hsl(217, 91%, 60%): hue 217 degrees, 91 percent saturation, 60 percent lightness. In HSV it is hsv(217 degrees, 76%, 96%), and in CMYK it is cmyk(76%, 47%, 0%, 4%). CMYK is always approximate, because printers and screens mix color in different ways.
HSV and OKLCH cover the gaps the first three formats leave. HSV matches the picker square: hue across, saturation and value down. OKLCH is the modern format that keeps colors looking evenly bright as you change hue, which HSL does not.
Try it: Type #FF5733 in the picker's HEX field and watch all six formats update.
- HEX
#3B82F6 - RGB
rgb(59, 130, 246) - HSL
hsl(217, 91%, 60%) - HSV
hsv(217°, 76%, 96%) - CMYK
cmyk(76%, 47%, 0%, 4%) - OKLCH
oklch(0.62 0.19 260)
CMYK is always approximate — printers and screens mix color in different ways.
Pick a color from a photo or screenshot
Upload any image and click any pixel to read its HEX code. The image never leaves your browser, and a magnifier shows the exact pixel before you click. Your last 16 picks stay in a history strip, so you can compare them side by side.
This is the fastest way to match a color you can see but cannot name. Drop in a logo, a photo, or a screenshot, zoom in with the magnifier, and click the pixel you want. The picker reads its HEX, RGB, and HSL codes at once. Photos of printed things and compressed screenshots give near-identical codes, not exact ones, so check the swatch before you ship it.
Try it: Upload a photo and click a pixel under the magnifier to read its HEX code.
Sample photo — click any pixel to read its color. To upload your own image, use the image picker.
Sampled color
Click a pixel above to sample its color.
Sampled colors
Build a palette from one color
One color makes a whole palette: complementary, analogous, triadic, split-complementary, tetradic, or monochromatic. Pick a harmony type and the tool lays out five colors that work together. Click any swatch to make it the new base color and rebuild the palette around it.
Complementary pairs sit opposite each other on the color wheel, 180 degrees apart, and give the strongest contrast. Analogous colors sit side by side and feel calm. Triadic palettes use three colors spaced 120 degrees apart. A good website palette has 3 to 5 colors: one main color, one or two accents, and one or two neutrals for text and backgrounds.
Try it: Pick a harmony type and watch five swatches appear around #3B82F6.
Color wheel — Build a palette from one color. Click a swatch to make it the new base color.
Shades and tints of one color
A shade is your color mixed with black, and a tint is your color mixed with white. This tool builds 10 lighter steps and 10 darker steps from any color, so you get a full scale for hover states, borders, and backgrounds from a single base color.
Pick #3B82F6 and the scale runs from near-white tints down to near-black shades, each step labeled with its HEX code. Use a light tint for a card background, the base color for a button, and a darker shade for the button on hover. That one scale keeps a whole page consistent without guessing a new color for every state.
Try it: Slide from the lightest tint to the darkest shade of #3B82F6 and copy any step.
Click a swatch to copy its HEX code.
Check contrast before you use a color for text
Text is readable when its contrast ratio is at least 4.5:1 for normal text and 3:1 for large text. That is the WCAG AA standard. AAA needs 7:1 for normal text. Pick any text and background color to get the ratio and a pass or fail.
White text on #3B82F6 scores 3.68:1, so it passes AA for large text but fails for normal text. Black text on the same blue scores 5.71:1 and passes AA for normal text. White on red scores 4.00:1, and white on yellow scores only 1.07:1 — yellow needs dark text. Black on yellow scores 19.56:1.
Large text means 18 point or larger, or 14 point bold or larger. Everything smaller is normal text and needs the full 4.5:1. When a pair fails, darken the text or lighten the background until the ratio passes — small shifts often fix it.
Try it: Pick a text color and a background color and read the ratio with its AA and AAA badges.
White text · Normal text
The quick brown fox jumps over the lazy dog
3.68:1
- AA normal: Fail
- AA large: Pass
- AAA normal: Fail
- AAA large: Fail
Black text · Large text
The quick brown fox jumps over the lazy dog
5.71:1
- AA normal: Pass
- AA large: Pass
- AAA normal: Fail
- AAA large: Pass
Popular colors and their HEX codes
The six colors everyone asks for are red #FF0000, green #008000, blue #0000FF, yellow #FFFF00, black #000000, and white #FFFFFF. Click any swatch to load it in the picker and see all six of its codes at once. The full chart has 148 CSS named colors, including tomato #FF6347.
Two names catch people out. Green is #008000, a dark green, while lime is #00FF00, the bright green most people picture when they say green. Aqua and cyan are the same color, #00FFFF, and fuchsia and magenta are the same color, #FF00FF. If a named color looks wrong, check its HEX code before you trust the name.
Try it: Click any popular swatch to load it in the picker with all six codes.
Click a swatch to load it in the picker.
HEX vs RGB vs HSL in one minute
HEX, RGB, and HSL are three ways to write the same color. HEX packs the red, green, and blue values into six digits, RGB lists the same three numbers from 0 to 255, and HSL describes the color by hue, saturation, and lightness instead.
Use HEX in CSS and HTML, because it is short and every browser reads it. Use RGB when code or a design tool hands you three numbers, or when you need an alpha channel as RGBA. Use HSL when you want to adjust a color: raise lightness for a tint, lower it for a shade, and shift hue to move around the wheel. One color, three notations, all in sync.
The table on this page shows all six formats for #3B82F6 side by side, so you can compare them without converting anything by hand. Pick the row that matches your job, copy its value, and paste it where the color belongs.
Try it: Read the table and find which format fits your job.
| Format | Example | Range | Best use |
|---|---|---|---|
| HEX | #3B82F6 | #RRGGBB — 6 digits | CSS and HTML |
| RGB | rgb(59, 130, 246) | 0–255 per channel | Code or a design tool, or RGBA for transparency |
| HSL | hsl(217, 91%, 60%) | 0–360°, 0–100%, 0–100% | Adjusting a color by hand |
| HSV | hsv(217°, 76%, 96%) | 0–360°, 0–100%, 0–100% | The picker square |
| CMYK | cmyk(76%, 47%, 0%, 4%) | 0–100% per channel | Print — always approximate |
| OKLCH | oklch(0.62 0.19 260) | Lightness 0–1, hue 0–360° | Even brightness across hues |
How to use HEX codes in CSS and HTML
Paste the HEX code after a # in your CSS, and the browser paints that exact color. Write color: #3B82F6; for text, background-color: #3B82F6; for a background, and border-color: #3B82F6; for a border. The same code works in HTML style attributes and in design tools like Figma and Canva.
Name colors by role, not by value, so your code stays readable: --brand: #3B82F6; in a CSS custom property, then color: var(--brand); wherever the brand color belongs. Shorthand works when each pair repeats: #3B82F6 has no shorthand, but #FF0000 shortens to #F00 and #FFFFFF shortens to #FFF. Add two digits at the end for transparency: #3B82F680 is the same blue at about 50 percent opacity.
Try it: Copy the CSS snippet and paste it into your own stylesheet.
color: #3B82F6;
background-color: #3B82F6;
border-color: #3B82F6;
--brand: #3B82F6;Sample text on your color
color: #3B82F6;
All color tools
- Hex Color Code Picker — Pick any color and copy its HEX, RGB, HSL, HSV, CMYK, or OKLCH code.
- Color Picker from Image — Upload an image, click a pixel, and read its HEX code.
- Screen Color Picker / Eyedropper — Sample any pixel on your screen.
- RGB to HEX Converter — Turn three RGB numbers into one HEX code.
- HEX to RGB Converter — Turn a HEX code into three RGB numbers.
- HEX to HSL Converter — Turn a HEX code into hue, saturation, and lightness.
- HSL to HEX Converter — Turn HSL values back into a HEX code.
- HEX to HSV Converter — Turn a HEX code into hue, saturation, and value.
- HEX to CMYK Converter — Turn a HEX code into approximate print values.
- RGB to HSL Converter — Turn RGB numbers into hue, saturation, and lightness.
- HEX to OKLCH Converter — Turn a HEX code into the modern OKLCH format.
- Color Converter — See one color in every format at once.
- HEX to RGBA Converter — Turn a HEX code into RGB with transparency.
- Color Name to HEX — Look up any of the 148 CSS named colors.
- Color Palette Generator — Build a five-color palette from one color.
- Color Shades Generator — Build 10 tints and 10 shades from one color.
- CSS Gradient Generator — Build a linear or radial gradient and copy the CSS.
- WCAG Contrast Checker — Check any text and background pair for AA and AAA.
- Color Mixer — Mix two colors and see the result.
- Random Color Generator — Pick a random color from all 16,777,216 HEX colors.
- Color Blindness Simulator — See your colors as color-blind users see them.
- Hex Color Codes Chart — The 148 named colors with HEX, RGB, and HSL.
Color guides
- What Is a HEX Color Code? — How to read #RRGGBB, pair by pair.
- How to Convert HEX to RGB — Split the digits, read each pair, done.
- How to Convert RGB to HEX — Divide by 16, twice per channel.
- HEX vs RGB vs HSL — Three notations, one color, and when to use each.
- HEX Shorthand — When #RGB works, and why it gives only 4,096 colors.
- HEX with Alpha — 8-digit HEX codes and transparency.
- HEX to CMYK, Approximate — Why print conversion is never exact.
- What Is OKLCH? — The modern color format, in plain words.
- How to Check Contrast — WCAG AA and AAA, with worked pairs.
- How to Choose Colors for a Website — Brand color, accents, neutrals, and the 60-30-10 rule.
- Color Psychology — What red, blue, green, and the rest say to visitors.
- Common Color Picker Mistakes — Shorthand surprises, lightness traps, and browser shifts.
- How to Find a HEX Code from an Image — Upload, zoom, click, copy.
Find the right color tool
21 tools, one topic — see About Hex Color Code Picker for who built this site.
- Color Picker from ImageUpload an image, click a pixel, and read its HEX code.
- Screen EyedropperSample any pixel on your screen.
- RGB to HEX ConverterTurn three RGB numbers into one HEX code.
- HEX to RGB ConverterTurn a HEX code into three RGB numbers.
- HEX to HSL ConverterTurn a HEX code into hue, saturation, and lightness.
- HSL to HEX ConverterTurn HSL values back into a HEX code.
- HEX to HSV ConverterTurn a HEX code into hue, saturation, and value.
- HEX to CMYK ConverterTurn a HEX code into approximate print values.
- RGB to HSL ConverterTurn RGB numbers into hue, saturation, and lightness.
- HEX to OKLCH ConverterTurn a HEX code into the modern OKLCH format.
- Color ConverterSee one color in every format at once.
- HEX to RGBA ConverterTurn a HEX code into RGB with transparency.
- Color Name to HEXLook up any of the 148 CSS named colors.
- Color Palette GeneratorBuild a five-color palette from one color.
- Shades GeneratorBuild 10 tints and 10 shades from one color.
- Gradient GeneratorBuild a linear or radial gradient and copy the CSS.
- Contrast CheckerCheck any text and background pair for AA and AAA.
- Color MixerMix two colors and see the result.
- Random Color GeneratorPick a random color from all 16,777,216 HEX colors.
- Color Blindness SimulatorSee your colors as color-blind users see them.
- Color ChartThe 148 named colors with HEX, RGB, and HSL.
No tool matches your search.
Frequently asked questions
A HEX color code is six digits after a #, like #3B82F6, that tell a browser how much red, green, and blue to mix. Each pair is one channel, from 00 to FF. Six digits give 16,777,216 colors.
Split the six digits into three pairs and read each pair as a base-16 number. #FF5733 splits into FF, 57, and 33, which are 255, 87, and 51, so it is rgb(255, 87, 51). The converter does it in one click.
Nothing in the color itself — they are two notations for the same three numbers. HEX writes them as six base-16 digits after a #, and RGB writes them as three decimal numbers from 0 to 255. #FF0000 and rgb(255, 0, 0) are the same red.
Upload the image to the picker from image tool, zoom in with the magnifier, and click the pixel you want. The tool reads its HEX code at once, and your last 16 picks stay in the history strip.
The # marks the digits that follow as a HEX color code, so the browser does not read them as a word or a number. Every HEX code in CSS starts with it, from #F00 to #3B82F6 to 8-digit codes like #3B82F680.
16,777,216: 256 values for red times 256 for green times 256 for blue. Three-digit shorthand gives only 4,096 colors, and adding two alpha digits gives transparency on top of the same 16.7 million.
At least 4.5:1 for normal text and 3:1 for large text, which is WCAG AA. AAA needs 7:1 for normal text. Check every text and background pair with the contrast checker before you publish.
Yes. Every tool on this site is free, with no sign-up and no account. Your colors are calculated in your browser, so nothing you pick or upload is sent to a server.