The color palette generator makes a set of colors that work together. Start with one base color and pick a rule from the color wheel, such as complementary or analogous, or upload a photo to pull out its main colors. You get 3 to 8 swatches with HEX, RGB and HSL codes, ready for a website, logo, slide deck or room design. For example, a base of #2A7DE1, a medium blue, with the complementary rule gives a warm orange, #E18E2A, as its partner.
How to use the color palette generator
- Choose From a color or From an image.
- From a color: type a HEX code or use the color picker, then pick a scheme. Random gives you a fresh starting color.
- From an image: upload a photo. The tool finds its main colors, most common first.
- Choose how many colors you want, from 3 to 8.
- Tap a swatch to copy its HEX code, or copy all the codes or the CSS variables at once.
Color schemes explained
| Scheme | How it works | Feel |
|---|---|---|
| Analogous | Neighbors on the color wheel, about 30° apart | Calm and natural |
| Complementary | Opposite colors, 180° apart | Bold and high contrast |
| Split complementary | The base plus the two colors beside its opposite | Lively but easier to balance |
| Triadic | Three colors evenly spaced, 120° apart | Bright and playful |
| Tetradic | Four colors in two opposite pairs, 90° apart | Rich, needs one main color |
| Monochromatic | One hue at different lightness and saturation | Clean and simple |
| Shades | One color from very light to very dark | Good for UI states and charts |
Extracting a color palette from an image
To make a palette from a photo, the tool shrinks the image and groups its pixels into clusters of similar colors, a method called k-means. Each cluster’s average becomes a swatch, and the swatches are sorted by how much of the picture they cover. Transparent pixels are skipped. The image never leaves your device, so it’s safe to use with private photos or unreleased designs.
HEX, RGB and HSL codes
- HEX, such as #2A7DE1, is the code most often used in CSS and design apps. Each pair of characters is the red, green and blue level from 00 to FF.
- RGB, such as rgb(42, 125, 225), gives the same levels from 0 to 255.
- HSL, such as hsl(213, 75%, 52%), describes hue on the color wheel in degrees, saturation and lightness. It’s the easiest code to adjust by hand.
The 60-30-10 rule
Designers often use a main color for about 60% of a space or page, a second color for about 30%, and an accent for the last 10%. With a five-color palette, pick one main color, one supporting color and one accent, and keep the rest for small details such as borders or hover states. Neutral grays and off-whites can fill in around them.
Check contrast for readable text
Each swatch shows its code in black or white, whichever is easier to read on it. For text on a website, the Web Content Accessibility Guidelines (WCAG) ask for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. Light pastel palettes often fail with white text, so test your pairs with the color contrast checker before you publish.
Using your palette in CSS
Copy CSS variables gives you a short block of code that names each color, starting with --color-1 for the base color. Paste it at the top of your stylesheet, then use a color anywhere with var(--color-1). When you want to try a different palette, paste the new block over the old one and every button, heading and background that uses the variables changes at once. You can rename the variables to something more meaningful, such as --brand or --accent, once you’ve picked your favorites.
Tips for choosing colors
- Start from your brand or a photo you love. A palette from a real image often looks more natural than one picked by hand.
- Limit bright colors. One or two saturated colors with neutrals usually looks more polished than five bright ones.
- Think about color blindness. About 1 in 12 men has some color vision deficiency, so don’t use red and green alone to show meaning.
- Test on screen and in print. Screens use RGB, while printers use CMYK, so very bright blues and greens can look duller on paper.
Palettes by mood
- Calm and trustworthy: blues and greens in an analogous scheme, often used by banks and health brands.
- Warm and friendly: oranges, yellows and soft reds, good for food and family brands.
- Bold and energetic: a complementary or triadic scheme with saturated colors, popular for sports and kids’ products.
- Elegant: a monochromatic palette of one deep color with plenty of white or cream.
Colors carry different meanings in different cultures, so think about who will see your design.
To fine-tune a single color, use the color picker, or convert codes with the HSL to RGB converter.
What next
Use this often? Add Color Palett to your Home screen.
Frequently asked questions
How does the color palette generator pick colors?
From a base color, it turns the hue around the color wheel by set angles for each scheme. From an image, it groups similar pixels and uses the main groups.
Can I extract a color palette from an image?
Yes. Choose From an image and upload a photo. The tool finds its main colors on your device, without uploading the image.
What is a complementary color?
The color directly opposite on the color wheel, 180° away. Blue and orange, and red and cyan, are complementary pairs.
How many colors should a palette have?
Most designs use three to five: a main color, a supporting color, an accent and one or two neutrals.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.