Midnight Sky

A dark linear gradient in indigo tones, interpolated in OKLCH across 2 stops so the ramp stays even from end to end.

Type
Linear
Stops
2
Space
OKLCH
Direction
180deg

The stops behind Midnight Sky

Endpoints sit closest to midnightblue and black.

0% · #00062c L 0.15 · C 0.08 · H 260
100% · #010105 L 0.08 · C 0.02 · H 280

Create Midnight Sky 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(
    180,
    'oklch(0.15 0.08 260)',
    'oklch(0.08 0.02 280)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 180, 'oklch(0.15 0.08 260)', 'oklch(0.08 0.02 280)', );

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 Midnight Sky 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(180deg, oklch(0.15 0.08 260), oklch(0.08 0.02 280));
background: linear-gradient(180deg, oklch(0.15 0.08 260), oklch(0.08 0.02 280));

Keep exploring

Build on Midnight Sky