Sunset

Late light over a horizon: a soft amber sky sinking to a deep red-orange. Radial from the top, so the warmth pools where the sun would sit.

Type
Radial
Stops
2
Space
OKLCH
Direction
ellipse at top

The stops behind Sunset

Endpoints sit closest to navajowhite and firebrick.

0% · #ffcf9a L 0.9 · C 0.1 · H 60
100% · #a8372a L 0.5 · C 0.15 · H 30

Create Sunset in PHP

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

<?php

use PhpColor\Color\Gradient\Gradient;

$gradient = Gradient::radial(
    'oklch(0.90 0.10 60)',
    'oklch(0.50 0.15 30)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::radial( 'oklch(0.90 0.10 60)', 'oklch(0.50 0.15 30)', );

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 Sunset 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: radial-gradient(ellipse at top, oklch(0.90 0.10 60), oklch(0.50 0.15 30));
background: radial-gradient(ellipse at top, oklch(0.90 0.10 60), oklch(0.50 0.15 30));