Create a seven-step OKLCH scale

Hold chroma and hue steady while sampling seven explicit perceptual lightness values.

Set the number of stops and the lightness range explicitly:

use PhpColor\Color\Color;
use PhpColor\Color\Palette\ColorPalette;

$scale = ColorPalette::lightnessScale(
    Color::parse('oklch(0.62 0.10 260)'),
    steps: 7,
    min: 0.26,
    max: 0.80,
);

assert([
    '#022053', '#18386e', '#305289', '#496ca5',
    '#6287c2', '#7da2e0', '#98bffe',
] === $scale->toHex());
use PhpColor\Color\Color; use PhpColor\Color\Palette\ColorPalette; $scale = ColorPalette::lightnessScale( Color::parse('oklch(0.62 0.10 260)'), steps: 7, min: 0.26, max: 0.80, ); assert([ '#022053', '#18386e', '#305289', '#496ca5', '#6287c2', '#7da2e0', '#98bffe', ] === $scale->toHex());

The result is an ordered scale, not a named token palette. Check the converted colors in your target gamut before publishing them.

Explore color scales or read palette generation.