🎨 Color Picker & Converter
Convert between HEX, RGB, HSL — pick, preview, generate palettes, and discover random colors. All in your browser.
🔢 Color Converter
👁️ Color Picker
Click the picker or paste a HEX value above
🎨 Palette Generator
🌈 Random Colors
Color Picker & Converter: What Each Part Does
Four small color utilities share this page, and all four run in your browser — no account, no upload, no round trip to a server.
- Color converter — HEX, RGB and HSL fields that stay in sync. Type into any one of them and the other two update as you type, together with the preview swatch at the top.
- Color picker — your browser's native color input. Click it and your operating system's picker opens; the HEX, RGB and HSL fields follow the color you choose.
- Palette generator — six color-harmony schemes (complementary, analogous, triadic, split complementary, tetradic, monochromatic). Click any swatch to make it the new base color, or copy the whole palette as a newline-separated HEX list.
- Random colors — fifteen random swatches on every load, each one clickable when you only need somewhere to start.
HEX, RGB and HSL: the Difference That Matters
All three notations describe the same color. They differ in which questions they make easy to answer.
- HEX (
#00d4aa) is what you paste into CSS, HTML and design tools: six digits, two per channel — red, green, blue. The three-digit shorthand works here too, so#0afis treated as#00aaff. - RGB (
rgb(0, 212, 170)) is the same three channels written as decimal numbers from 0 to 255, which is easier to reason about when you are nudging one channel at a time. Values outside 0–255 are clamped rather than rejected. - HSL (
hsl(168, 100%, 42%)) is hue in degrees, then saturation and lightness as percentages. This is the notation that makes systematic edits possible — keep the hue and step the lightness to build a tint ladder, or keep saturation and lightness and rotate the hue along a harmony.
Four limits are worth knowing, because they explain most "why did my color change?" moments:
- HSL is held as whole numbers on this page.
#00d4aaishsl(168, 100%, 42%), and converting that rounded HSL back through RGB lands on#00d6ab— a step or two off in each channel. Treat HEX as the authoritative value and HSL as the editable view of it. - Decimals in HSL are rejected.
hsl(168.5, 100%, 42%)will not be parsed; round it to a whole number first. - Color names and the newer CSS functions are not parsed.
red,oklch()andrgba()are out of scope here — this is a HEX/RGB/HSL converter, not a full CSS color parser. - No transparency. The picker is the browser's own, which has no alpha channel, so
there is no 8-digit HEX and no
rgba()output.
The Six Palette Schemes, and the Maths Behind Them
- Complementary — 2 swatches: your color and the hue 180° opposite it. The classic high-contrast pair.
- Analogous — 5 swatches at ±30° and ±60° around your hue, with saturation nudged up 10 points and lightness stepped 5 points per step. The safest scheme for backgrounds and gradients.
- Triadic — 3 swatches spaced 120° apart at your saturation and lightness.
- Split complementary — 4 swatches: your color plus the hues at 120°, 150° and 180° from it, which gives most of the contrast of a complementary pair without the full clash.
- Tetradic — 4 swatches spaced 90° apart, where the second and fourth are desaturated by 20 points and darkened by 10 so the four do not fight each other at full strength.
- Monochromatic — 5 swatches on a fixed lightness ladder (20%, 36%, 52%, 68%, 84%) at your hue and saturation. The ladder is fixed rather than derived from your base color, which is worth remembering if you expected your own lightness to be one of the five.
Two honest caveats. First, these are HSL rotations, not perceptual color science: the hues are mathematically even but not perceptually even, so a triadic palette can look lopsided next to what a tool built on OKLCH or CIELAB would suggest. Second, the black-or-white swatch labels are chosen with the ITU-R BT.601 luma formula — a legibility heuristic for those labels, not a WCAG contrast check. Run a real contrast audit before shipping text colors.
How to Use the Color Picker
- Start from a value you already have — paste a HEX code, an
rgb()string or anhsl()string into the matching field, or click the color input to open your system picker. - Read the other notations — the preview swatch shows the HEX, RGB and HSL forms at once, each with its own Copy button.
- Pick a harmony — switch between the six schemes above the swatch strip, then click any swatch to make that color the new base.
- Copy what you need — one value from its Copy button, or the whole palette from Copy All.
Where These Values Actually Get Used
- CSS variables — convert a designer's HEX swatch into
hsl()so tint and shade variants become arithmetic instead of guesswork. - Chart and data-viz series — a five-color analogous palette covers most categorical charts, and the swatches come out in the order they will be plotted.
- Design-system colors — the monochromatic ladder is a ready-made five-step scale for a single brand hue.
- Throwaway colors — the random grid gives you plausible values for mock data, placeholder avatars and test fixtures.
Related Tools
❓ Frequently Asked Questions
Is the color picker and converter free to use?
Yes, completely free. No sign-up, no usage limits and no watermark on anything you copy.
Does it require an internet connection?
No. Every conversion, palette and random-color generation runs client-side in your browser, so your colors are never uploaded and the page keeps working offline once it has loaded.
Why did my HEX code change slightly when I converted HSL back to HEX?
Because the HSL values here are whole numbers. #00d4aa is hsl(168, 100%, 42%), and converting that rounded HSL back to RGB gives #00d6ab: a step or two off in each channel. Keep the HEX code as the value you ship and treat HSL as the editable view.
Does it support transparency, 8-digit HEX or rgba()?
No. The picker is the browser's native color input, which has no alpha channel, so every color here is fully opaque and the output is 3 or 6 digit HEX, rgb() or hsl().
Can I pick a color from anywhere on my screen?
Not from this page. It opens your operating system's own color picker, so it cannot sample pixels elsewhere on screen. Use the OS-level screen picker or your browser's developer tools eyedropper, then paste the HEX value into the field here.
Which color formats can I type in?
HEX with or without the leading hash (three or six digits), rgb() with comma or space separators, and hsl() with whole-number hue and percentage saturation and lightness. Color names such as red, and newer CSS functions such as oklch() or rgba(), are not parsed.
How are the palette colors calculated?
Each scheme rotates your base hue in HSL: complementary by 180 degrees, analogous by plus or minus 30 and 60 degrees, triadic by 120 degrees, split complementary to the 120, 150 and 180 degree hues, tetradic by 90 degrees, and monochromatic along a fixed lightness ladder of 20, 36, 52, 68 and 84 percent.
Are the generated palettes accessible or color-blind safe?
They are not guaranteed to be. The schemes are HSL rotations and the tool does not run any contrast check, so treat a palette as a starting point and verify text and background pairs with a dedicated contrast checker before shipping.
Can I copy an entire palette at once?
Yes. The Copy All button puts every swatch in the current palette on the clipboard as a newline-separated list of HEX codes, ready to paste into a stylesheet.