0% · #ff35e8
L 0.75 · C 0.3 · H 340
Electric Pink
A light linear gradient in magenta 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 Electric Pink
Endpoints sit closest to fuchsia and darkmagenta.
100% · #8c00a7
L 0.45 · C 0.25 · H 320
Create Electric Pink 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.75 0.30 340)',
'oklch(0.45 0.25 320)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
45,
'oklch(0.75 0.30 340)',
'oklch(0.45 0.25 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 Electric Pink 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.75 0.30 340), oklch(0.45 0.25 320));
background: linear-gradient(45deg, oklch(0.75 0.30 340), oklch(0.45 0.25 320));