Royal Red

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

Type
Linear
Stops
2
Space
OKLCH
Direction
90deg

The stops behind Royal Red

Endpoints sit closest to crimson and maroon.

0% · #d40924 L 0.55 · C 0.22 · H 25
100% · #540000 L 0.25 · C 0.15 · H 20

Create Royal Red 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(
    90,
    'oklch(0.55 0.22 25)',
    'oklch(0.25 0.15 20)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 90, 'oklch(0.55 0.22 25)', 'oklch(0.25 0.15 20)', );

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 Royal Red 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(90deg, oklch(0.55 0.22 25), oklch(0.25 0.15 20));
background: linear-gradient(90deg, oklch(0.55 0.22 25), oklch(0.25 0.15 20));