0% · #614afc
L 0.55 · C 0.25 · H 280
Electric Indigo
A deep linear gradient in indigo 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 Electric Indigo
Endpoints sit closest to slateblue and navy.
100% · #13007f
L 0.25 · C 0.2 · H 270
Create Electric Indigo 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.25 280)',
'oklch(0.25 0.20 270)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
90,
'oklch(0.55 0.25 280)',
'oklch(0.25 0.20 270)',
);
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 Electric Indigo 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.25 280), oklch(0.25 0.20 270));
background: linear-gradient(90deg, oklch(0.55 0.25 280), oklch(0.25 0.20 270));