Color Picker and Converter

Pick a colour or type any CSS colour value to get its HEX, RGB, HSL, HSV and CMYK equivalents, contrast ratios against white and black, and a row of tints and shades. Free, instant and computed in your browser.

Color Picker and ConverterPrivate · runs on your device
Colour
Tints and shades
Values

Example: #4f46e5 → rgb(79, 70, 229) · hsl(243, 75%, 59%)

How to use the color picker

Start from a swatch or from a value you already have; the two controls stay in step.

  1. Click Pick a colour to open your browser colour chooser, or type into Or type any CSS colour. Accepted forms include #4f46e5, rgb(79, 70, 229), hsl(243, 75%, 59%) and names such as rebeccapurple.
  2. Read the large swatch and the Values panel: HEX with the nearest CSS colour name, then RGB, HSL, HSV / HSB, CMYK, Decimal, Complementary, Contrast on white, Contrast on black and a closing row that recommends white or black text.
  3. Use Tints and shades. Four darker steps, the original marked with a dot, four lighter steps and a comp button for the complement. Click any button to copy its hex code.
  4. Press Copy all values to put the whole list on the clipboard.

Text the browser cannot parse shows a note asking for a valid CSS colour. Transparency is ignored, so rgba(79, 70, 229, 0.5) reports the solid colour. Everything is arithmetic done in the page, so nothing is uploaded.

Common jobs include turning a hex code from a design file into an rgb() value for a stylesheet, finding an hsl() value from which to build hover and disabled states, checking whether white or black text suits a button colour, and getting the single decimal integer that some game and graphics tools expect.

One colour, five descriptions

The example #4f46e5 shows how the models relate.

ModelValueWhat it describes
HEX#4F46E5The RGB numbers written in base 16
RGBrgb(79, 70, 229)Red, green, blue light, 0 to 255
HSLhsl(243, 75%, 59%)Hue angle, saturation, lightness
HSVhsv(243, 69%, 90%)Hue, saturation, value (picker squares)
CMYKcmyk(66%, 69%, 0%, 10%)Ink coverage for print, approximate

The Decimal row, 5195493, is the same colour as a single integer, and the nearest named CSS colour is royalblue. In HSL, lowering the lightness gives a shade and raising it gives a tint, which is why that model is easiest for hand adjustment. HSV differs because 100% value is the pure colour, not white. CMYK uses a simple formula with no press or paper profile, so give a printer the HEX or RGB value instead. Values are rounded for display, so converting back by hand can be out by one. When a stylesheet is ready, the CSS formatter tidies it, and the number base converter shows how hex pairs map to decimal.

Contrast ratios and what the tool can and cannot judge

Contrast compares the relative luminance of two colours on a scale from 1:1 to 21:1. The WCAG minimums for text are:

  • AA: 4.5:1 for normal text and 3:1 for large text (about 24px regular or 19px bold).
  • AAA: 7:1 for normal text and 4.5:1 for large text.
  • Non-text parts such as icons and input borders need 3:1 against neighbouring colours.

For the example, the tool reports 6.29:1 on white, labelled AA, and 3.34:1 on black, labelled AA large text only. So white text is the readable choice, which is what the closing row of the panel recommends. The label is judged for normal-size text: AAA, AA, AA large text only, or fails. Two limits follow. Contrast is only measured against pure white and pure black, never against another colour you choose, so a grey background needs a separate check. Judging a design also means testing real sizes, weights and states, not one ratio. The complementary colour is the hue rotated 180 degrees with saturation and lightness kept, here #DCE546, which is a starting point for accents and charts rather than a finished palette. Colours for a favicon can be prepared with the favicon generator.

Shorthand such as #fff and names such as teal are expanded by the browser before conversion. Each tint or shade step moves the HSL lightness 20, 40, 60 or 80 percent of the way towards white or towards black, while hue and saturation stay put.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

How do I convert HEX to RGB?

Split the six hex digits into three pairs and convert each pair from base 16 to decimal. For #4f46e5, 4f is 79, 46 is 70 and e5 is 229, giving rgb(79, 70, 229). Three-digit shorthand like #fff doubles each digit first. The tool does this instantly as you type.

What is the difference between HSL and HSV?

Both use the same hue angle but measure brightness differently. In HSL, 100% lightness is always white and the pure colour sits at 50%. In HSV, 100% value is the pure colour at full saturation. HSL is handier for CSS tints and shades; HSV matches most picker squares.

What contrast ratio do I need for WCAG AA?

Normal text needs at least 4.5:1 and large text at least 3:1 against its background. Large text means roughly 24px regular or 19px bold. AAA raises these to 7:1 and 4.5:1. Icons and input borders need 3:1 against neighbouring colours.

Can I use CMYK values from this tool for printing?

Treat them as a starting point. A proper RGB to CMYK conversion needs a colour profile for the specific press, ink and paper, and this tool uses the simple formula without one. Give your printer the HEX or RGB value and let their software do the profiled conversion.

Does the color picker upload my colours or images?

No. Choosing a swatch, typing a value and converting between models are all arithmetic performed by JavaScript in your browser, and nothing is sent to a server. The tool does not read images, and no history of the colours you tried is kept.