One Click Answers

OCADeveloper & Design

Share tool
FacebookPinterestEmail

Color Picker

Pick a color and copy its HEX, RGB, HSL or HSV value in one click.

About this tool & how to use it

What the Color Picker does

Lets you pick any color and shows its HEX, RGB and HSL codes ready to copy, so you can use the same color in a design, a document or a web page.

How to use the Color Picker

  1. Click the swatch to pick a color, or type a HEX, RGB or HSL value.
  2. Copy whichever format you need.
  3. Check the contrast rows to see whether white or black text reads better on it.
#1E90FFHEX
White text on this color
Black text on this color

Contrast ratio with WCAG result for normal-size text: AA needs 4.5:1, AAA needs 7:1.

Related tools

Try another answer

How it works

All conversions use the standard sRGB formulas. HSL and HSV values are rounded to whole numbers, so converting back can be off by one in a channel.

Contrast uses the WCAG 2 ratio of relative luminance. 4.5:1 meets AA for normal text and 7:1 meets AAA.

Two more examples: #FF0000 is rgb(255, 0, 0), hsl(0, 100%, 50%) and hsv(0, 100%, 100%). Mid-gray #808080 is rgb(128, 128, 128), hsl(0, 0%, 50%) and hsv(0, 0%, 50%).

On #808080, white text has a contrast ratio of about 3.9:1, which fails the 4.5:1 AA level for normal text, while black text has about 5.3:1 and passes. Black on white is 21:1, the highest possible.

Assumptions

  • Colors are in sRGB. HSL and HSV are rounded to whole numbers.
  • Contrast uses the WCAG 2 relative-luminance formula for normal-size text (AA 4.5:1, AAA 7:1).

Color Picker example

Input: #1E90FF

Result: rgb(30, 144, 255), hsl(210, 100%, 56%), hsv(210, 88%, 100%).

Color Picker questions

Can I type a short HEX like #f80?

Yes. Three-digit HEX values are expanded, so #f80 becomes #FF8800.

Does the browser color picker match my screen exactly?

The values are exact; how a color looks depends on your display and its color profile.

Which text color should I use on my color?

Use the contrast rows. Pick the one that reaches at least 4.5:1 for normal text (AA), or 7:1 for the stricter AAA level.

Why can converting a color back give a slightly different value?

HSL and HSV values are rounded to whole numbers, so turning them back into RGB can be off by one in a channel.

Last reviewed 2026-10-19. Report an incorrect result

Got another question?

Free, no account. Answers show how they were worked out.