RGB and HEX Color Picker: Copy Color Codes

Choose a shade from your browser's color dialog and copy the HEX and RGB values instantly. Includes how to read color codes, contrast rules and print caveats.

The output will appear here.
Advertisement icyabmod — get a website for your business, design it on a live demo

How RGB and HEX Color Picker: Copy Color Codes works

Choose a shade from your browser's color dialog and copy the HEX and RGB values instantly. Includes how to read color codes, contrast rules and print caveats.

Input Color
Output HEX / RGB / HSL
Works done 3,981

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

  1. Click the color swatch to open your browser's color dialog.
  2. Choose a shade from the palette, or type a HEX or RGB value if the dialog offers that.
  3. Press Run tool to display the HEX and RGB codes.
  4. 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

FormatExample (same orange)Where it is used
HEX#ff8800CSS, HTML, design tools, brand guidelines
RGB / RGBArgb(255, 136, 0)CSS, transparency, programming
HSLhsl(32, 100%, 50%)Building lighter and darker variants of one hue
CMYK0, 47, 100, 0Commercial 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.

Advertisement icyabmod — 7 sections × 10 designs and 10 color palettes: design your site yourself, preview ready in 48 hours

Frequently asked questions

Split the six characters after the hash sign into three pairs and convert each pair from base 16 to base 10. For #1e90ff, 1e is 30, 90 is 144 and ff is 255, giving rgb(30, 144, 255). In hexadecimal, the letters a to f stand for the values 10 to 15. This tool does the conversion for you and shows both values together.

If your browser's color dialog has an eyedropper button, click it and then click the spot whose color you want; the swatch updates, and running the tool gives you the codes. Without an eyedropper, take a screenshot and use the color picker in an image editor. Compressed images can shift a shade slightly, so confirm important colors against the original source.

Both are correct. Browsers and design programs treat HEX codes as case-insensitive, so #FF8800 and #ff8800 are the same color. This tool outputs lower case. What matters is choosing one style for a project and sticking to it, which makes searching code, comparing colors and spotting duplicate values much easier.

Screens mix light (RGB), while printers lay down ink (CMYK). The two systems can reproduce different ranges of color, and bright purples, greens and oranges in particular often print duller. Paper stock and the printer's color profile affect the result too. For consistent print work, ask your printer for CMYK values and request a proof for anything important.

CSS offers two common ways. Add a fourth number to the RGB value: rgba(255, 136, 0, 0.5) is orange at 50 percent opacity. Or append two characters to the HEX code: #ff880080 gives the same result, because 80 in hexadecimal is 128, roughly half of 255. This tool picks opaque colors, so add the transparency yourself after copying the code.

AARRGGBB is a HEX code with the alpha (opacity) byte written first instead of last. Android color resources and XAML use this order, so opaque orange is #FFFF8800 and half-transparent orange is #80FF8800, while CSS would write the latter as #ff880080. This picker returns opaque #rrggbb codes; to turn one into AARRGGBB, put FF in front for full opacity or a smaller two-digit hex value for partial transparency.