Volcanic

A linear gradient sweeping from dark blue to mid orange, interpolated in OKLCH across 3 stops so the midpoint stays vivid instead of greying out.

Type
Linear
Stops
3
Space
OKLCH
Direction
180deg

The stops behind Volcanic

Endpoints sit closest to black and orangered.

0% · #040609 L 0.12 · C 0.01 · H 250
50% · #760009 L 0.35 · C 0.15 · H 25
100% · #f84713 L 0.65 · C 0.22 · H 35

Create Volcanic 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.12 0.01 250)',
    'oklch(0.35 0.15 25)',
    'oklch(0.65 0.22 35)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 180, 'oklch(0.12 0.01 250)', 'oklch(0.35 0.15 25)', 'oklch(0.65 0.22 35)', );

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 Volcanic 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.12 0.01 250), oklch(0.35 0.15 25), oklch(0.65 0.22 35));
background: linear-gradient(180deg, oklch(0.12 0.01 250), oklch(0.35 0.15 25), oklch(0.65 0.22 35));