Calculates on this device. File exports run online.
Color Palette Generator
Make a palette from one colour, from a picture, as a scale of shades, at random, or as a gradient. Every colour comes with its hex, RGB, HSL and OKLCH codes, black or white text that reads best on it, and code to copy.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to make a palette
- Choose what you want to make under What do you want to make?
- Type a base colour, such as
#3366cc,rgb(51, 102, 204)or a colour name such asroyalblue. - Choose a colour rule, a scale or a kind of gradient, and press the button.
- Copy the hex codes, the CSS, SCSS, JSON, Tailwind or GIMP palette from the result.
- To save the palette as a picture (PNG, SVG, PDF) or a document (PDF, Word, Excel, PowerPoint), use the boxes below the result.
The colour rules
A rule turns the hue of your colour around the colour wheel. On the usual HSL wheel the saturation and lightness stay the same. On the OKLCH wheel (under More options) the lightness and chroma stay the same, so the colours look about as light as each other; a colour that does not fit the screen range gets a little less chroma.
- Complementary: the opposite hue, 180° away.
- Analogous: neighbour hues, 30° apart (you can change the angle and the number of colours).
- Triadic: three hues 120° apart. Square: four hues 90° apart.
- Split complementary: the base and the two hues 30° on each side of its complement (150° and 210°).
- Tetradic (rectangle): the base, a hue 60° away, and the two opposite hues.
- Monochromatic: one hue and saturation, with lightness spread evenly between 10% and 95% around your colour.
- For the 60-30-10 rule, make three colours (for example analogous or split complementary) and use the first for about 60% of the area, the second for 30% and the third for 10%.
Shades, tints, tones and the 50 to 950 scale
A tint is your colour mixed with white, a shade with black, and a tone with grey (#808080). You choose how many steps; 9 steps give 10%, 20% … 90%.
The scale of 11 steps puts your colour at 500. Steps 50, 100, 200, 300 and 400 mix it with white by 95%, 90%, 75%, 55% and 30%; steps 600 to 950 mix it with black by 15%, 30%, 45%, 60% and 75%. This is the rule of this tool. It is not the colour list of Tailwind CSS, Material Design or Bootstrap, but you can copy the scale into a Tailwind theme.
Mixing in sRGB mixes the codes the way most tools do. Mixing in OKLab (under More options) gives steps that look more even.
Gradients
Enter two to eight colours. Leave the positions empty to spread them evenly, as CSS does. You get the CSS for a background, for gradient text and for a gradient border, the colours in between as a list, an SVG picture, and a Tailwind class. The angle of a linear gradient follows CSS: 0° goes up, 90° to the right.
- Linear, radial (from the centre out) and conic (around the centre) gradients are CSS gradients. Conic gradients have no SVG form, so they are CSS only.
- Soft colour spots are several radial gradients that fade out, on a background colour, often called a mesh gradient.
- Under More options you can mix the colours in OKLab or OKLCH, which avoids the grey middle that red to green gets in sRGB, and add a moving background (it stops for people who ask their device for less motion).
- The picture box below saves the gradient as PNG, JPEG or WebP at the pixel size you choose, such as 1920 × 1080 for a wallpaper.
Contrast and accessible palettes
Choose Contrast of every pair in a palette and type or paste your colours. You get the WCAG 2.2 contrast ratio of every pair, and which pairs pass for normal text (4.5:1, level AA), large text and graphics (3:1) and level AAA (7:1). Every palette result also shows whether black or white text reads better on each colour.
Colours for charts
Colours for charts and maps gives different hues of the same lightness for categories, a light-to-dark scale for amounts, two colours around a light middle for values above and below a midpoint, or the 8 colours of Okabe and Ito (2008), which most people with colour vision deficiency can tell apart. You also get the colours as a list for JavaScript, Python or R.
Palette from a picture
Choose Palette from a picture and pick a PNG, JPEG or GIF on your device, such as a photo, a logo or a screenshot. The picture is read in your browser and is not sent anywhere. You get its main colours and how much of the picture each one covers. Use these colours in a gradient puts them into the gradient maker.
How it works: the picture is read at up to 200 × 200 points spread evenly over it. Points that are more than half transparent are left out. The points are then split into groups of similar colours by median cut: the group with the widest range of red, green or blue is cut in two at its middle value, until there are as many groups as colours you asked for. Each colour is the average of its group.
JPEG pictures are turned into pixels the way the common libjpeg library does it by default, so the numbers match most photo programs. A colour profile in the file (such as Display P3) is not applied. WebP, HEIC, AVIF and BMP pictures are not read yet: save them as PNG or JPEG first.
Random colours
Random colours or a random palette gives new colours each time: any colour, colours inside a hue, saturation and lightness range (pastel, bright, dark, muted, warm, cool and more), or a random colour with a colour rule. The colours come from the secure random numbers of your browser.
What this tool does not do
- It has no Pantone, RAL, DMC, Copic, Ohuhu or Prismacolor colour lists. Those are the makers’ own tables. For print, ask your printer or use the maker’s guide.
- It does not read the colours of a website from its address. Save a screenshot and use Palette from a picture. To read the colour of one point in a picture, use the Color Picker.
- It does not invent a palette from words or a theme (such as "autumn" or a film title); it uses colour rules, chance, or a picture you give.
- CMYK values are the naive formula from RGB, not a conversion with a press profile.
- Colours look different on other screens and in print. Check important colours where you will use them.
Privacy
The palette is made in your browser, and a picture you choose is read there too. Only when you press Make the picture or Make the document is the result on screen sent to the Toolvito server to make the file: the colours and codes, the drawing and the facts shown (such as the file name of a picture). The picture itself is never sent. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.