How to use it
This RGB and HEX color picker turns any shade you choose into the codes software understands. It opens your browser's built-in color chooser and shows the selected color as a hexadecimal code, the value after the # sign such as #8f39e8, and as an RGB color code such as rgb(143, 57, 232), ready to paste into CSS, a design app or a brand guide. Picking and converting both happen in your browser.
How to use the color picker
- Click the color swatch to open your browser's color dialog.
- Choose a shade from the palette, or type a HEX or RGB value if the dialog offers that.
- Press Run tool to display the HEX and RGB codes.
- Use Copy output and paste the codes wherever you need them.
Reading HEX and RGB color codes
Screens build every color from red, green and blue light. RGB notation writes the strength of each channel as a number from 0 to 255: rgb(255, 0, 0) is pure red, rgb(0, 0, 0) is black and rgb(255, 255, 255) is white. Together the three channels describe 256 × 256 × 256 = 16,777,216 colors.
A HEX code is the same three numbers written in base 16. In #ff8800, ff is red at 255, 88 is green at 136 and 00 is blue at 0, so the color is rgb(255, 136, 0), a strong orange. When each pair repeats a digit, the code can be shortened: #f80 means exactly the same as #ff8800. Two extra digits at the end add transparency, so #ff880080 is that orange at roughly 50 percent opacity.
Color formats side by side
| Format | Example (same orange) | Where it is used |
|---|---|---|
| HEX | #ff8800 | CSS, HTML, design tools, brand guidelines |
| RGB / RGBA | rgb(255, 136, 0) | CSS, transparency, programming |
| HSL | hsl(32, 100%, 50%) | Building lighter and darker variants of one hue |
| CMYK | 0, 47, 100, 0 | Commercial print; conversion from screen colors is approximate |
The tool shows HEX and RGB. HSL describes a color as hue (0 to 360 degrees), saturation and lightness, which is why designers like it for jobs such as making a button slightly darker on hover: keep the hue, lower the lightness. CMYK, used for print, depends on the paper and on the printer's color profile. Vivid screen purples and greens often cannot be reproduced in ink at the same intensity, so for exact print colors rely on values supplied by your printer.
Contrast and accessibility
A color that looks great is not automatically readable as text. The Web Content Accessibility Guidelines (WCAG) ask, at level AA, for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. White text on #ff8800, for example, falls well short of that, while dark text on the same orange passes comfortably. After picking colors, check each text and background pair with a contrast calculator, and never let color carry meaning on its own: pair a red error state with an icon or a message.
Sampling from the screen and keeping colors consistent
The color dialog looks different in each browser and operating system. Some include an eyedropper button that lets you click anywhere on screen, such as a logo or a photo, and capture that pixel's color. Where there is no eyedropper, choose the shade from the palette by hand.
The same HEX code can look slightly different on two monitors because of brightness, color gamut and calibration. On the web, colors are interpreted in the sRGB color space by default. To keep brand colors consistent, define each code once and reuse that exact value everywhere. Avoid recording a color sampled from a screenshot or a compressed photo as an official value, since compression and color profiles can shift the shade.
Everyday uses
- Writing background, text and button colors into a stylesheet.
- Passing logo or brand colors to a designer, a developer or a print shop.
- Building a small palette so slides, charts and social graphics reuse the same shades.
- Switching quickly between HEX and RGB when two programs expect different formats.
For a deeper explanation of how color codes work, read the guide to HEX and RGB color codes. If you are writing CSS, the CSS beautifier keeps the stylesheet tidy, and more utilities are listed under design tools.
Privacy
Picking and converting colors happens entirely in your browser; the chosen color is not sent to our server. The page only increments an anonymous counter recording that the tool was used.