Ember

A coal caught mid-burn: pale gold at the core falling to a deep orange edge. Radial and warm the whole way down.

Type
Radial
Stops
2
Space
OKLCH
Direction
circle at 30% 30%

The stops behind Ember

Endpoints sit closest to goldenrod and red.

0% · #ffbe00 L 0.85 · C 0.18 · H 80
100% · #e43800 L 0.6 · C 0.22 · H 40

Create Ember 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.85 0.18 80)',
    'oklch(0.60 0.22 40)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::radial( 'oklch(0.85 0.18 80)', 'oklch(0.60 0.22 40)', );

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 Ember 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(circle at 30% 30%, oklch(0.85 0.18 80), oklch(0.60 0.22 40));
background: radial-gradient(circle at 30% 30%, oklch(0.85 0.18 80), oklch(0.60 0.22 40));