Skip to main content

DigitalCalculators.net

Color Picker

Last updated By the DigitalCalculators.net team Free, no sign-up

Pick a color or type a HEX, RGB or HSL code to get the same color in every format, plus contrast ratios, tints and shades.

Results

FormatValue

Tints and Shades

HEX, RGB, HSL and HSV are exact conversions of the same sRGB color. CMYK uses the simple textbook formula, so it is a starting point, not a print-ready value; printers use color profiles. Contrast ratios use the WCAG 2 formula. Click a tint or shade to use it.

Quick Answer

Click the color box to pick a color, or type a code such as #3B5BDB. The tool shows the same color as HEX, RGB, HSL, HSV and CMYK, and checks its contrast with white and black text. For example, #3B5BDB is rgb(59, 91, 219) and hsl(228, 69%, 55%).

Last updated: 15 November 2026 ·How we calculate this: how colors are converted

How This Color Picker Works

Use the color box to pick any color with your device’s color chooser, or type a code you already have. The tool reads HEX (like #3B5BDB or #36C), RGB (like rgb(59, 91, 219)) and HSL (like hsl(228, 69%, 55%)) and converts it to all the common formats at once.

What you get:

  • Codes: HEX, RGB, HSL, HSV/HSB, simple CMYK and decimal.
  • Contrast: ratios with white and black text, with WCAG pass or fail.
  • Tints and shades: 9 lighter and darker versions; click one to use it.

How to Use the Color Picker

  1. Click the color box and pick a color, or type a color code.
  2. Press Convert, or watch the results update.
  3. Copy the HEX, RGB, HSL or other code you need.
  4. Check the contrast with white and black text.
  5. Click a tint or shade to explore lighter and darker versions.

How Colors Are Converted

  • HEX to RGB: each pair of hex digits is one channel from 0 to 255. 3B = 3 × 16 + 11 = 59.
  • RGB to HSL: hue comes from which channel is largest; lightness = (max + min) ÷ 2; saturation = (max − min) ÷ (1 − |2 × lightness − 1|).
  • CMYK (simple): K = 1 − max(R, G, B) ÷ 255, then C = (1 − R′ − K) ÷ (1 − K), and the same for M and Y.
  • Contrast ratio: (L1 + 0.05) ÷ (L2 + 0.05), where L is relative luminance from WCAG 2: 0.2126 R + 0.7152 G + 0.0722 B after gamma correction.
  • Tints and shades: mix with white (tints) or black (shades) in 20% steps.

Key Terms

  • HEX code: a color written as 6 hexadecimal digits, two each for red, green and blue.
  • RGB: red, green and blue values from 0 to 255.
  • HSL: hue (0 to 360°), saturation and lightness (0 to 100%).
  • Contrast ratio: how different two colors are in brightness, from 1:1 to 21:1.

Worked Example

Convert #3B5BDB.

  • RGB: 3B = 59, 5B = 91, DB = 219 → rgb(59, 91, 219)
  • Max = 219 (blue), min = 59, so lightness = (219 + 59) ÷ 2 ÷ 255 = 54.5%
  • Saturation: (219 − 59) ÷ 255 ÷ (1 − |2 × 0.545 − 1|) = 69%
  • Hue: 228°, so HSL is hsl(228, 69%, 55%)
  • Contrast with white: about 5.7:1, which passes WCAG AA for normal text

Real-Life Examples

  • Web design: #FF5733 is rgb(255, 87, 51) for CSS.
  • Accessible buttons: white text on #3B5BDB has about 5.7:1 contrast, so it passes AA.
  • Brand colors: turn a brand’s RGB values into HEX for a website.
  • Lighter backgrounds: an 80% tint of #3B5BDB is #D8DEF8.

HEX vs RGB vs HSL

  • HEX: a short code, such as #3B5BDB, common in web design.
  • RGB: the same three channels as numbers from 0 to 255.
  • HSL: hue, saturation and lightness, easier for making lighter or darker versions.
  • All three: describe the same sRGB color, so you can use whichever your tool accepts.

Common Colors

These are the CSS named colors white, black, red, lime, blue, yellow and gray.

ColorHEXRGB
White#FFFFFF255, 255, 255
Black#0000000, 0, 0
Red#FF0000255, 0, 0
Lime green#00FF000, 255, 0
Blue#0000FF0, 0, 255
Yellow#FFFF00255, 255, 0
Gray#808080128, 128, 128

Tips for Using Colors

  • Check contrast: WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text.
  • Use HSL to adjust: change only lightness to make a lighter or darker version of the same hue.
  • Screens vary: the same code can look slightly different on different screens.
  • For print: ask your printer for the right CMYK values or color profile.
  • Short HEX: #36C means #3366CC.

Common Mistakes to Avoid

  • Treating simple CMYK as print-ready. Printers use color profiles.
  • Forgetting contrast. Light text on light colors is hard to read.
  • Mixing up HSL and HSV. They share hue but measure brightness differently.
  • Missing the # sign. CSS needs #3B5BDB, not 3B5BDB.
  • Judging color on one screen. Check designs on more than one device.

Frequently Asked Questions

Type the HEX code, such as #3B5BDB. The RGB value, rgb(59, 91, 219), appears in the results.

Type rgb(59, 91, 219) and read the HEX line: #3B5BDB.

WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text. AAA asks for 7:1.

No. It uses the simple formula. For print, use your printer’s color profile.

Yes. #36C is read as #3366CC.

Tints mix the color with white; shades mix it with black.

No. Everything runs in your browser.

Both use hue. HSL uses lightness, where 100% is white; HSV uses value, where 100% is the brightest version of the color.

Some browsers let the color box pick from anywhere on screen with an eyedropper; others only offer a color chart.

References & Sources

SourceUsed ForLink
W3C, CSS Color Module Level 4 HEX, RGB and HSL color formats and conversion. https://www.w3.org/TR/css-color-4/
W3C, WCAG 2.2: Contrast (Minimum) Contrast ratio formula and the 4.5:1 and 3:1 levels. https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html

Cite or share this calculator

DigitalCalculators.net. (2026, November 15). Color Picker. https://digitalcalculators.net/color-picker/