A color picker lets you choose a color visually and read its code. Drag the hue and saturation controls or sample a pixel, and the picker shows the same color as HEX, RGB, HSL, HSV and CMYK. This one also shows contrast on white and black, so you know whether the color works as text.
Key facts
HEX, RGB and HSL are three notations for the same sRGB color.
The EyeDropper sampler works in Chromium browsers such as Chrome and Edge.
Text on a background needs at least 4.5:1 contrast to pass WCAG AA.
One color in every format
Color
HEX
RGB
HSL
Red
#FF0000
rgb(255, 0, 0)
hsl(0, 100%, 50%)
Rose
#E11D48
rgb(225, 29, 72)
hsl(347, 77%, 50%)
Orange-red
#FF5733
rgb(255, 87, 51)
hsl(11, 100%, 60%)
Navy
#000080
rgb(0, 0, 128)
hsl(240, 100%, 25%)
Gray
#808080
rgb(128, 128, 128)
hsl(0, 0%, 50%)
Last updated · Maintained by the ColorBase team. Free to use, no sign-up needed.
How to use this tool
A practical walkthrough
Use this picker when you already have a hue in mind — a brand rose, a screenshot, or a CSS token — and need HEX, RGB, RGBA, and a contrast check before you paste it into code.
Click Randomize (shuffle) for a new opaque HEX when you need a starting swatch, or use EyeDropper (Chrome/Edge) to sample a pixel.
Fine-tune with HSV first. Switch the RGB tab when you think in 0–255 channels. RGBA copy uses the same RGB with alpha 1 until you overlay it in CSS.
Paste HEX, rgb(), or rgba() in the value field. Alpha in rgba() is kept for copy; the painted swatch is opaque sRGB.
Read the contrast pair on the panel. Copy HEX for design tools, RGBA for overlays, HSL for CSS variables, or CMYK only when a print partner asked for it.
Randomize is for exploration, not a brand lock. RGBA is the overlay format of the same swatch. Harmonies, tints, and WCAG stay next to the value so you do not ship a pretty color that fails on buttons.
HEX, RGB, and HSL on one swatch
A picker is a notation tool. The painted square is an opaque sRGB color, and every format on the panel is that same color written a different way. HEX packs red, green, and blue into two hex digits each, so #E11D48 is red 225, green 29, and blue 72. RGB writes those decimals for canvas and for rgba overlays. HSL keeps the hue angle and lets you change lightness without guessing new hex digits. OKLCH is there when you want lightness to mean what your eye sees rather than what the hex counter does. Alpha does not belong in the opaque swatch. Put it in rgba() or in the modern rgb() slash form after you have locked the base color. Randomize is for exploration. EyeDropper, where the browser allows it, samples a pixel on your screen. Neither one checks whether 16px text will pass WCAG. Read the contrast pair before you copy a light brand tint into body copy.
HEX, RGB, RGBA (same channels with alpha 1), HSL, HSV, OKLCH, and CMYK. Use RGBA when CSS needs an overlay; keep HEX as the source of truth for opaque fills.
02What does Randomize do?
Randomize (the shuffle control) replaces the current swatch with a new opaque HEX. It does not change your saved favorites. Tune hue afterward, then copy RGBA if you need a matching overlay.
03How should I use the picker in a real project?
Sample, randomize, or paste a value, check contrast on the same panel, then copy HEX for design tools or RGB/RGBA/HSL for CSS. There is a written walkthrough under the tool on this page.
04Which format should I copy from the color picker?
Copy HEX for design tools and design tokens. Copy RGB or RGBA when CSS needs an overlay. Copy HSL when you are adjusting lightness by hand.
05Does the eyedropper work in every browser?
EyeDropper works in Chromium browsers such as Chrome and Edge. Other browsers can still paste a HEX or use the sliders.
06Why does a pretty swatch fail as text?
Mid-light colors often fall under 4.5:1 on white. The contrast line on the picker is the check, not the attractiveness of the swatch.