← Back

Color Palette from Hex

LOCAL

Generate multiple shades from a hex color.

Input

Output

What is Color Palette from Hex?

Color Palette from Hex produces darker and lighter RGB variations around one base color. It multiplies the red, green and blue channels by smaller or larger factors, rounds them and clips them to the allowed range. This gives quick numerical variations, not a perceptually uniform palette or a guarantee of accessible color combinations.

How to use Color Palette from Hex

Enter #808080 as Base color and 1 as Number of shades per side, then choose Generate. Expect three lines in this order: #404040, #808080 and #c0c0c0. The first is darker, the middle is the base, and the last is lighter.

When is Color Palette from Hex useful?

Choose a whole-number step count from 1 through 10. The output contains twice that number plus the base color: 4 steps per side produce 9 lines, while 10 produce 21. A six-digit hexadecimal color is required; the leading # is optional. Names, rgb() values, alpha channels and three-digit shorthand are not accepted.

Example

Try #fff for the invalid-color message. An empty, fractional or out-of-range step count produces a separate input error. Channel clipping can cause duplicate output colors. Black #000000 remains black even on the lighter side, because multiplying zero cannot move a channel toward white.

Practical notes

Use the values as starting points for design tokens and inspect them in the intended interface. More steps change the scaling factors as well as the output count, so a larger palette is not simply the previous palette with extra entries. Copy the foreground/background pair into the Contrast Checker to assess text contrast. Generation runs locally and does not alter your website’s styles.