Skip to content
Test versionSearch

Developer tools

Deterministic five-colour HSL palette

Generate a five-colour HSL palette from one opaque base colour using a nearby, complementary, triad or monochrome scheme, with CSS variables and JSON.

How it worksFAQRelated tools

Content reviewed:

The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.

Strict hex3/4/6/8 digits. Rounded 8-bit sRGB, no print/ICC or physical pigment matching. Press Calculate to update the result; you can download it as TXT or CSV. Own formulas, no external library, font or image. Swatch preview only; codes remain in the report. Nearby hues −30,−15,0,+15,+30; complement 0,0,180,180,0; triad 0,120,240,120,240. Non-monochrome lightness offsets −15,0,+15,0,−15 clamped 5–95. Monochrome lightness 10,30,50,70,90. CSS variables/JSON array. No random/locks/individual edits or aesthetic/accessibility guarantee. JSON and HTML contain inputs. Numeric values are original calculation values; existing report precision is retained. Optional live calculation is initially off. No automatic storage or transmission. Additional own CSS/SVG/PNG files show calculated CSS code or 240×60 result swatches over white. No gradient geometry, embedded font or external image. Separately: own image palette up to 10MiB/16MP/8192px, sample up to 128px. RGB bins with 16 levels per channel, alpha below 16/255 ignored, up to five most frequent bins and mean RGB. No k-means equivalence. JSON/CSS/PNG without image bytes; HSL palette above remains independent.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Own bounded colour formulas: basic sRGB/HSL, alpha mixture, deterministic palettes and three-stop CSS. Own structured JSON/result-row TXT/printable HTML files retain original inputs, options and result values. Strict hex3/4/6/8 digits. Rounded 8-bit sRGB, no print/ICC or physical pigment matching. Press Calculate to update the result; you can download it as TXT or CSV. Own formulas, no external library, font or image. Swatch preview only; codes remain in the report. Nearby hues −30,−15,0,+15,+30; complement 0,0,180,180,0; triad 0,120,240,120,240. Non-monochrome lightness offsets −15,0,+15,0,−15 clamped 5–95. Monochrome lightness 10,30,50,70,90. CSS variables/JSON array. No random/photo extraction/locks/individual edits or aesthetic/accessibility guarantee. JSON and HTML contain inputs. Numeric values are original calculation values; existing report precision is retained. Optional live calculation is initially off. No automatic storage or transmission. Additional own CSS/SVG/PNG files show calculated CSS code or 240×60 result swatches over white. No gradient geometry, embedded font or external image.

Worked example

With these example values the calculator gives the result below. You can change any value in the form above.

Inputs

Opaque base hex colour
#2979FF
Five-colour scheme
Nearby hues

Result

Base colour
#2979FF
Colour 1
#00C0DC
Colour 2
#29AFFF
Colour 3
#76A9FF
Colour 4
#2944FF
Colour 5
#1C00DC
Generated CSS
:root { --colour-1: #00C0DC; --colour-2: #29AFFF; --colour-3: #76A9FF; --colour-4: #2944FF; --colour-5: #1C00DC; }
JSON colour array
["#00C0DC","#29AFFF","#76A9FF","#2944FF","#1C00DC"]

Frequently asked questions

How does the five-colour HSL palette generator work?

It generates five colours from one opaque base colour using a declared deterministic HSL scheme. The same input always gives the same palette, with no random element.

Which palette schemes are available?

The page describes nearby (analogous), complement, triad and monochrome schemes. Nearby hues are -30, -15, 0, +15 and +30, complement is 0, 0, 180, 180, 0, and triad is 0, 120, 240, 120, 240.

What colour formats does the base colour accept?

The base must be a strict hex code with 3, 4, 6 or 8 digits, and only an opaque base is supported. Results are rounded 8-bit sRGB.

How is lightness set in the palette?

For non-monochrome schemes the lightness offsets are -15, 0, +15, 0, -15, clamped to 5 to 95. Monochrome lightness values are 10, 30, 50, 70 and 90.

Can I get the palette as CSS or JSON?

Yes. The result includes CSS variables and a JSON array, and you can also download colour CSS, a swatch SVG or a swatch PNG.

Can the tool extract colours from a photo?

Yes, separately from the HSL palette. It accepts a PNG, JPG or WebP up to 10 MiB, 16 MP and 8192 px per side, samples up to 128 px, and returns up to five most frequent bins with mean RGB.

Does the palette guarantee good contrast or accessibility?

No. There is no aesthetic or accessibility guarantee, no contrast verification, and no print, ICC or physical pigment matching.