Cool Slate

A pastel linear gradient in blue tones, interpolated in OKLCH across 3 stops so the ramp stays even from end to end.

Type
Linear
Stops
3
Space
OKLCH
Direction
135deg

The stops behind Cool Slate

Endpoints sit closest to lightgray and darkslategray.

0% · #c8cfd4 L 0.85 · C 0.01 · H 240
50% · #7f92a0 L 0.65 · C 0.03 · H 240
100% · #3b596e L 0.45 · C 0.05 · H 240

Create Cool Slate in PHP

Build a linear gradient from the catalog stops, then let PHPColor assign their positions.

<?php

use PhpColor\Color\Gradient\Gradient;

$gradient = Gradient::linear(
    135,
    'oklch(0.85 0.01 240)',
    'oklch(0.65 0.03 240)',
    'oklch(0.45 0.05 240)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 135, 'oklch(0.85 0.01 240)', 'oklch(0.65 0.03 240)', 'oklch(0.45 0.05 240)', );

Inspect and convert its stops

Each stop remains a color object, ready for conversion, contrast checks, or further manipulation.

<?php

foreach ($gradient->getStops() as $stop) {
    echo $stop->color->to('oklch')->toCss();
}
foreach ($gradient->getStops() as $stop) { echo $stop->color->to('oklch')->toCss(); }

Format Cool Slate for CSS

Serialize the gradient directly, or choose a wide-gamut notation for every stop.

<?php

$css = $gradient->toCss();
$p3  = $gradient->toCss('display-p3');
$css = $gradient->toCss(); $p3 = $gradient->toCss('display-p3');
background: linear-gradient(135deg, oklch(0.85 0.01 240), oklch(0.65 0.03 240), oklch(0.45 0.05 240));
background: linear-gradient(135deg, oklch(0.85 0.01 240), oklch(0.65 0.03 240), oklch(0.45 0.05 240));