All free tools

Free tool · technology

Colour Palette Generator

Build a five-colour palette from a base colour, with hex codes ready to copy.

Colours

Enter any hex value or use the picker. Everything is calculated in your browser.

Result

#daf5ae #bfee72 #a3e635 #72a125 #415c15

Tints and shades of the base colour, ready to paste into a design token file.

Embed this on your site

Free to embed. The attribution link stays with the widget, and the calculator keeps working exactly as it does here.

<iframe src="https://thedigitalstash.net/embed/color-palette-generator" title="The Digital Stash calculator" width="100%" height="720" style="border:0;max-width:100%" loading="lazy"></iframe>

Understanding the Colour Palette Generator

The Colour Palette Generator is a utility designed to produce a harmonious set of five colours derived from a single starting point. By using systematic mathematical adjustments to the hue, saturation, and lightness of a base colour, the tool creates a balanced selection suitable for digital design, interface development, or print layouts.

The Methodology

The generator relies on the HSL (Hue, Saturation, Lightness) colour model. Unlike the RGB model, which describes colour through additive light components, HSL aligns more closely with how humans perceive colour.

When you input a base hex code, the tool performs the following operations:

  1. It converts the hex code into HSL values.
  2. It holds the hue constant or rotates it by predefined mathematical intervals to ensure the set feels related.
  3. It applies specific modifiers to the saturation and lightness levels across five distinct steps.
  4. It converts these new HSL values back into hex codes for your use.

The five colours generated consist of the base colour plus four variations: two lighter tints and two darker shades. This ensures that the resulting palette maintains a consistent aesthetic while providing enough contrast for accessibility and visual hierarchy.

Worked Example

Consider a base colour defined by the hex code #3498DB, which is a vivid shade of blue.

If we process this base colour through the generator, the resulting palette might look like this:

  • Colour 1 (Darkest): #1A4D6E
  • Colour 2 (Darker): #2772A4
  • Colour 3 (Base): #3498DB
  • Colour 4 (Lighter): #6AB2E2
  • Colour 5 (Lightest): #9FCBE9

In this instance, the tool has calculated the shades by decreasing the lightness value in steps for the darker colours and increasing the lightness value in steps for the lighter colours, while keeping the saturation constant. This provides a predictable, monochromatic progression.

Interpreting the Results

The primary output is a list of five hex codes. Hex codes are six-digit strings that represent the red, green, and blue components of a colour. These codes are the standard format for CSS, HTML, and most design software.

When using these results, consider their application:

  • The lightest and darkest colours are typically best suited for backgrounds or text, depending on the contrast ratio.
  • The middle shades are generally intended for primary elements like buttons, icons, or graphical accents.
  • Always test the contrast between your chosen text colour and the background colour to ensure it meets legibility standards.

Assumptions and Limits

The tool assumes that a monochromatic or near-monochromatic palette is what you require. It does not perform complex colour theory operations such as finding complementary, triadic, or split-complementary harmonies. It operates under the assumption that the provided hex code is accurate and that the user intends to maintain a consistent hue across the five-colour range.

The limitations of the tool include:

  • Fixed Scope: It generates exactly five colours. You cannot request a larger or smaller palette.
  • Algorithm Constraints: The generator applies a uniform shift. In some cases, particularly with extremely dark or extremely light base colours, the calculated variations may appear too similar to one another due to the physical limits of the display.
  • Colour Space: It does not account for the differences between digital screen displays and physical ink printing. Colours that look vibrant on a monitor may appear duller when printed on paper due to the conversion from RGB to CMYK.

Who This Tool Is Not For

This tool is not intended for professional branding experts or art directors who require highly bespoke, context-specific colour systems. Because the tool relies on a rigid mathematical formula, it may not be suitable for those looking for complex, high-contrast, or multi-hue palettes where the relationship between colours is governed by nuanced artistic intent rather than fixed increments.

Furthermore, this tool is not for users who need accessibility auditing. While the generator provides colours, it does not calculate the specific contrast ratios required to meet international web accessibility standards (WCAG). If your project must comply with strict accessibility requirements, you must perform separate checks using a dedicated contrast checker to ensure that any pairing of these colours remains readable for all users. Finally, if you require colour profiles or pantone matching, this tool is not suitable, as it is strictly limited to standard hex-based web colour calculations.

More tools like this