0% · #3c2ea4
L 0.4 · C 0.18 · H 280
Neon Night
A linear gradient sweeping from deep indigo to mid magenta, interpolated in OKLCH across 2 stops so the midpoint stays vivid instead of greying out.
- Type
- Linear
- Stops
- 2
- Space
- OKLCH
- Direction
- 45deg
The stops behind Neon Night
Endpoints sit closest to darkslateblue and mediumorchid.
100% · #d433f5
L 0.65 · C 0.28 · H 320
Create Neon Night 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.40 0.18 280)',
'oklch(0.65 0.28 320)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
45,
'oklch(0.40 0.18 280)',
'oklch(0.65 0.28 320)',
);
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 Neon Night 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.40 0.18 280), oklch(0.65 0.28 320));
background: linear-gradient(45deg, oklch(0.40 0.18 280), oklch(0.65 0.28 320));