0% · #ff5f00
L 0.75 · C 0.25 · H 40
Cyber Sunset
A linear gradient sweeping from mid orange to dark indigo, 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 Cyber Sunset
Endpoints sit closest to orangered and midnightblue.
50% · #9200b1
L 0.45 · C 0.28 · H 320
100% · #090033
L 0.15 · C 0.1 · H 280
Create Cyber Sunset 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.75 0.25 40)',
'oklch(0.45 0.28 320)',
'oklch(0.15 0.10 280)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
180,
'oklch(0.75 0.25 40)',
'oklch(0.45 0.28 320)',
'oklch(0.15 0.10 280)',
);
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 Cyber Sunset 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.75 0.25 40), oklch(0.45 0.28 320), oklch(0.15 0.10 280));
background: linear-gradient(180deg, oklch(0.75 0.25 40), oklch(0.45 0.28 320), oklch(0.15 0.10 280));