0% · #ff914f
L 0.85 · C 0.22 · H 40
Lava
A radial gradient sweeping from light amber to dark orange, interpolated in OKLCH across 3 stops so the midpoint stays vivid instead of greying out.
- Type
- Radial
- Stops
- 3
- Space
- OKLCH
- Direction
- circle at center
The stops behind Lava
Endpoints sit closest to coral and maroon.
50% · #e90000
L 0.55 · C 0.28 · H 25
100% · #370007
L 0.2 · C 0.1 · H 15
Create Lava 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.22 40)',
'oklch(0.55 0.28 25)',
'oklch(0.20 0.10 15)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::radial(
'oklch(0.85 0.22 40)',
'oklch(0.55 0.28 25)',
'oklch(0.20 0.10 15)',
);
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 Lava 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 center, oklch(0.85 0.22 40), oklch(0.55 0.28 25), oklch(0.20 0.10 15));
background: radial-gradient(circle at center, oklch(0.85 0.22 40), oklch(0.55 0.28 25), oklch(0.20 0.10 15));