Color Toolkit & Photo Picker
Color picker and converter
Pick a color from a photo
How to use the Color Toolkit & Photo Picker
Use the color picker to choose any color and see its HEX, RGB and HSL values at once. You can also type a value into any of the three boxes and the others update automatically. To pick a color from a picture, choose an image from your device and click any spot on it. The sampled color is shown above and added to a short history so you can go back to it. Images are read in your browser and are not uploaded.
Color formats explained
- HEX: a six-digit code such as #3b5bdb, widely used in web design and CSS. Three-digit shorthand like #fff is also accepted.
- RGB: amounts of red, green and blue from 0 to 255, for example rgb(59, 91, 219).
- HSL: hue (0 to 360 degrees on the color wheel), saturation and lightness as percentages. It is handy for making lighter or darker versions of the same color.
Example: white, pure red and a color from a photo
White is #ffffff, rgb(255, 255, 255) and hsl(0, 0%, 100%). Pure red is #ff0000, rgb(255, 0, 0) and hsl(0, 100%, 50%). To match a color in a logo or photo, upload the image, click the area you like and copy the HEX code into your design.
Everyday color tasks
- Converting a design’s HEX code to RGB for another tool
- Matching a website color to a brand image or product photo
- Building palettes by sampling several points from a picture
- Finding lighter or darker shades by changing HSL lightness
Frequently asked questions
Why does a sampled color differ from what I see in another program?
Screens, color profiles and image compression can shift colors. Photos also have gradients, so nearby pixels differ slightly.
Is my photo uploaded?
No. It is drawn onto a canvas in your browser.
Does it show color names or contrast ratios?
No. It focuses on conversion and picking.
Building a palette from one color
Most websites and brands need more than one shade of their main color: a light tint for backgrounds, the main color for buttons, and a darker shade for hover states and text. HSL makes this easy because you can keep the hue and saturation and change only the lightness.
Starting from the default blue, #3b5bdb or hsl(228, 69%, 55%), type these values into the HSL box one at a time and copy the HEX code each produces:
| Use | HSL to enter |
|---|---|
| Page or card background tint | 228, 69, 95 |
| Light border or selected row | 228, 69, 85 |
| Main button color | 228, 69, 55 |
| Button hover | 228, 69, 45 |
| Dark heading or text on light backgrounds | 228, 69, 25 |
The same method works for any color: find its hue in the HSL box, then step the lightness up and down.
Sampling a palette from a photo
- Load a photo whose mood you want to match, such as a product shot or a landscape.
- Click four or five distinct areas: a dark shadow, a light highlight, the main subject and one accent. Each pick is saved in the history row of swatches.
- Click each swatch in the history to bring it back and copy its HEX code.
- Click flat areas rather than edges. Pixels at the border between two colors are a blend and give muddy results.
Check readability before you use a color for text
A color can look good as a block and still be hard to read as text. Accessibility guidelines (WCAG) recommend a contrast ratio of at least 4.5:1 for normal text against its background. As a rough rule with HSL, text with a lightness of 30% or lower usually reads well on a white or very light background, while pale text around 60% lightness or higher often does not. When in doubt, choose the darker option.
Taking colors from a large photo? Shrinking it first with the Image Resizer keeps the picker fast without changing the colors you sample.
Limitations
Large photos are scaled down for display, so sampled values come from the scaled copy. Conversions between formats are rounded to whole numbers. See our Disclaimer and Privacy Policy. Browse the full tools directory. Related tools: Image Resizer, Image Compressor & Converter.
Learn more: read our Image Guides, articles on image compression, file formats and QR codes.