Drag in the color field and hue bar, or type any code, and every format updates instantly: HEX, RGB, HSL, HSV and CMYK. Grab a color from anywhere on your screen with the eyedropper, save favorites and copy ready-to-use CSS.
Aa
#2F6B4F
RGB
HSL
HSV
CMYK
Saved
Tints mixed with white
Shades mixed with black
Harmonies
Advertisement
Advertisement
How to use the Color Picker
Choose a hue on the rainbow bar, then drag the circle in the big field: left to right adds saturation, bottom to top adds brightness.
Or type a code: paste a HEX value, RGB numbers, HSL, HSV or CMYK and the picker jumps to that color.
Pick from your screen with the Pick from screen button, then click any pixel in any window (supported in Chrome, Edge and Opera).
Copy the format you need with its Copy button. Click a tint, shade or harmony color to load it.
Save colors you like with Save swatch. They stay in this browser for next time, and you can copy them all as CSS variables.
Color formats explained
Format
Example
What the numbers mean
Used in
HEX
#2F6B4F
Red, green, blue as two hexadecimal digits each (00 to FF). An optional 4th pair is opacity.
CSS, HTML, design tools
RGB
rgb(47, 107, 79)
Red, green and blue light from 0 to 255.
CSS, screens, code
HSL
hsl(152, 39%, 30%)
Hue angle 0 to 360°, saturation and lightness in %. 50% lightness is the pure color.
CSS, theming
HSV / HSB
hsv(152, 56%, 42%)
Hue, saturation and value (brightness). 100% value is the brightest version of the hue.
Photoshop, Figma, pickers
CMYK
cmyk(56%, 0%, 26%, 58%)
Cyan, magenta, yellow and key (black) ink coverage in %.
Print design
Conversion formulas
All conversions start from RGB values scaled to 0 to 1 (R' = R / 255, and so on), with max = the largest and min = the smallest of R', G', B'.
Hue (same for HSL and HSV): if max = R', H = 60 × ((G' − B') / (max − min) mod 6); if max = G', H = 60 × ((B' − R') / (max − min) + 2); if max = B', H = 60 × ((R' − G') / (max − min) + 4).
HSV: V = max, S = (max − min) / max (0 when max = 0).
HSL: L = (max + min) / 2, S = (max − min) / (1 − |2L − 1|) (0 for grays).
CMYK: K = 1 − max, C = (1 − R' − K) / (1 − K), M = (1 − G' − K) / (1 − K), Y = (1 − B' − K) / (1 − K).
Rounding to whole numbers means converting back and forth can shift a value by one step; the picker keeps the exact value internally so the color does not drift while you drag.
Tints, shades and harmonies
A tint is the color mixed with white and a shade is the color mixed with black. The strips above mix in 10% steps in RGB, which gives an even ramp for buttons, hover states and backgrounds. The harmony groups rotate the hue around the color wheel while keeping saturation and brightness: complementary is 180° away, triadic uses 120° steps, analogous uses neighbors 30° away, split complementary uses 150° and 210°, and tetradic uses 90° steps. For more options, open the Color Wheel or the Color Shades Generator.
Frequently asked questions
How do I pick a color from my screen?
Click Pick from screen and then click any pixel on your screen, even outside the browser window. This uses the browser's EyeDropper feature, which is available in Chrome, Edge and Opera on desktop. In Firefox and Safari, take a screenshot and use the Image Color Picker tool instead.
What is the difference between HSL and HSV?
Both use the same hue angle. In HSV (also called HSB) a value of 100% is the brightest version of the color, so pure red is hsv(0, 100%, 100%). In HSL, 100% lightness is always white and pure red is hsl(0, 100%, 50%). Design apps such as Photoshop use HSB in their pickers, while CSS uses HSL.
Why do the CMYK values not match my printer?
This tool uses the simple, device-independent RGB to CMYK formula: K = 1 - max(R, G, B) and C = (1 - R - K) / (1 - K), and so on. Real printing uses ICC color profiles for a specific press and paper, so a print shop may give slightly different numbers. Use the values here as a starting point.
How does opacity appear in the codes?
When opacity is below 100%, the HEX code gets a fourth pair of digits (for example #2F6B4F80 is about 50% opacity), and rgb() and hsl() get an alpha value. All modern browsers support these formats in CSS.
Are my saved colors private?
Yes. Saved swatches are stored only in your browser's local storage on this device. Nothing is sent to a server, and clearing your browser data removes them.
What does the contrast ratio mean?
It is the WCAG 2 contrast ratio between the picked color and white or black text. Normal text needs at least 4.5:1 to pass level AA and 7:1 for AAA; large text needs 3:1.