0% · #ff0022
L 0.65 · C 0.28 · H 25
Hot Chili
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
- 45deg
The stops behind Hot Chili
Endpoints sit closest to red and firebrick.
100% · #b90000
L 0.45 · C 0.25 · H 35
Create Hot Chili 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(
45,
'oklch(0.65 0.28 25)',
'oklch(0.45 0.25 35)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
45,
'oklch(0.65 0.28 25)',
'oklch(0.45 0.25 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 Hot Chili 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(45deg, oklch(0.65 0.28 25), oklch(0.45 0.25 35));
background: linear-gradient(45deg, oklch(0.65 0.28 25), oklch(0.45 0.25 35));