Color Picker

Free online color picker. Pick any color and instantly get hex, shorthand hex, rgb(), rgba(), hsl() and hsla() CSS codes plus a complementary and analogous coordinating palette. Click any code to copy. Runs in your browser.

Pick a color to get its hex, RGB and HSL codes.

How color picker works

The color picker uses your browser native color input so you can drag through the spectrum or type an exact hex value. The chosen color is converted into every code format a developer commonly needs: a 6-digit hex, the 3-digit shorthand when it exists, and the rgb(), rgba(), hsl() and hsla() CSS function strings you can paste straight into a stylesheet.

Behind the scenes the red, green and blue channels are converted to the HSL (hue, saturation, lightness) color space. Hue is an angle around the color wheel, so rotating it by fixed amounts produces harmonious neighbors: 180 degrees is the complementary color, and ±30 degrees are the analogous colors that sit next to the base on the wheel.

The coordinating palette shows your base color plus its complementary and analogous neighbors, so you can build a small, coherent scheme without a separate tool. Click any code or swatch to copy it to the clipboard.

Frequently asked questions

Why does my color not have a 3-digit hex shorthand?
A shorthand like #abc only exists when each color pair is a doubled digit (aa, bb, cc). #ffffff becomes #fff, but #1a73e8 has no shorthand because the pairs are not all doubles.
What is the difference between rgb() and hsl()?
rgb() describes a color by its red, green and blue light amounts. hsl() describes the same color by hue (angle on the wheel), saturation and lightness, which most people find easier to adjust intuitively. Both describe identical colors.
How is the complementary color chosen?
The complementary color is the color directly opposite on the color wheel, produced by rotating the hue 180 degrees while keeping saturation and lightness the same. It offers the strongest contrast to the base.
Is the color picker free and private?
Yes. Everything runs in your browser — no color is sent to a server, and there is nothing to install.