HEX Color PaletteCopyable Hex Codes for Every Swatch
A hex color palette is only useful if the codes are easy to take with you. Every swatch here shows its six-digit hex value with a single click to copy, alongside the matching RGB and HSL, so the palette moves into Figma, Tailwind or plain CSS without retyping.
- Under 50 ms
- 100% client-side
- HEX, RGB & HSL
- Unlimited palettes
Live palette preview
Everything runs in this tab. No palette is uploaded, saved or limited.
Space to shuffle · 1–5 to lock
Need artwork for the palette? Resize an image, convert HEIC to JPG or check an aspect ratio — all local.
WCAG contrast checker
Test any text colour against any background. The ratio is calculated from relative luminance, exactly as WCAG defines it.
CSS custom properties
Five named variables, ready for a :root block. Copy the set and the palette moves into your stylesheet.
ToolGuest HEX Color Palette generator builds a five-swatch palette and shows every value as a six-digit hex code, with the RGB and HSL equivalents beside it. Choose a base colour and a harmony rule, copy one code or the whole set as CSS variables, and verify WCAG contrast — all in the browser, in under 50 ms.
A color palette with hex codes you can paste anywhere
A hex code is the most portable way to write a colour: six hexadecimal digits, two per channel, prefixed with a hash. #3B82F6 is red 0x3B, green 0x82 and blue 0xF6, which is the same colour as rgb(59, 130, 246). Because it needs no colour profile and no named-colour lookup, hex is what CSS, Figma, Tailwind configs and design token files all accept.
The practical problem with a hex palette is transcription. Reading five codes off a screenshot and typing them into a stylesheet is where a brand colour quietly becomes a slightly different brand colour. Every value on this page is a button: click it and the exact string is on the clipboard, with the toast confirming what was copied.
| Format | Example | Where it is used |
|---|---|---|
| HEX | #3B82F6 | CSS, Figma, design tokens, most design tools and brand guidelines. |
| RGB | rgb(59, 130, 246) | CSS, canvas APIs and JavaScript colour libraries. |
| HSL | hsl(217, 91%, 60%) | CSS and any workflow that adjusts lightness or saturation systematically. |
| CSS custom property | --color-primary: #3b82f6; | A theme file, so a brand change is one edit rather than a search and replace. |
Turning a single hex value into a hex color scheme
Paste a brand hex into the base field and the generator derives four more colours from it with the harmony rule you choose. Triadic is the default here because a triadic set gives three distinct hues, which is usually what a hex color scheme generator is asked for: one primary, one secondary and one accent, plus two neutrals.
Uppercase and lowercase hex are the same colour, and browsers do not care which you use. The palette prints uppercase for readability and copies the same uppercase string, so a value pasted into a stylesheet matches the value on screen. Short three-digit hex is accepted as input and expanded, so #38f becomes #3388FF.
Why a hex palette still needs a contrast number
Hex tells you what a colour is, not whether text on it can be read. Contrast is a ratio between the relative luminance of two colours, and WCAG asks for 4.5:1 for normal text at AA and 7:1 at AAA. Two hex values that look distinct in a swatch strip can still be 2.1:1 apart, which is unreadable for a large share of visitors.
The checker on this page takes any two colours — from the palette or typed by hand — and reports the exact ratio with pass or fail badges for each threshold. Test the darkest swatch against the lightest first, then against the accent; those two pairings cover most of a real interface.
Once the hex palette is settled, finish the page assets with the image resizer, the HEIC to JPG converter and the aspect ratio calculator.
HEX palette questions
What is a hex color palette?
It is a set of colours written as six-digit hexadecimal codes, two digits each for red, green and blue. Because every browser and design tool reads hex the same way, a hex palette is the most portable format for handing colours between a design file and a stylesheet.
How do I copy a hex code from the palette?
Click the hex value on any swatch. The exact six-digit string is written to your clipboard and a confirmation appears. The RGB and HSL lines below it are buttons too, so you can copy whichever format the destination tool expects.
Can I use three-digit hex codes as input?
Yes. Typing a shorthand value such as #38f expands to #3388FF before the palette is generated, because three-digit hex is simply each digit doubled, so the colour is identical. The tool expands it so the copied output is always unambiguous and safe to paste into a stylesheet or a design token file.
Why does the same colour have different hex and RGB values online?
It should not. Hex and RGB are the same numbers in different bases, so #3B82F6 and rgb(59, 130, 246) are the same colour. A mismatch usually means a colour profile conversion, a screenshot recompression, or a tool that rounded the channels.
How many hex codes should a brand palette include?
Five is a practical default: a primary, a secondary, an accent and two neutrals. A brand guide can list more tints, but an interface rarely needs them. Keeping the core set small is what makes the palette recognisable across a website, a deck and a social template.
Every palette and contrast tool in the ToolGuest cluster
Seven palette pages share one engine, so a colour scheme, a HEX palette, an analogous or complementary set and a WCAG-checked accessible palette all generate the same way. The three media tools finish the job once the colours are chosen.