0% · #4ee11b
L 0.8 · C 0.25 · H 140
Neon Sweep
A light conic gradient in green tones, interpolated in OKLCH across 3 stops so the ramp stays even from end to end.
- Type
- Conic
- Stops
- 3
- Space
- OKLCH
- Direction
- from 45deg
The stops behind Neon Sweep
Endpoints sit closest to limegreen and limegreen.
50% · #f00098
L 0.6 · C 0.3 · H 350
100% · #4ee11b
L 0.8 · C 0.25 · H 140
Create Neon Sweep in PHP
Build a conic gradient from the catalog stops, then let PHPColor assign their positions.
<?php
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::conic(
45,
)->stops(
'oklch(0.80 0.25 140)',
'oklch(0.60 0.30 350)',
'oklch(0.80 0.25 140)',
)->build();
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::conic(
45,
)->stops(
'oklch(0.80 0.25 140)',
'oklch(0.60 0.30 350)',
'oklch(0.80 0.25 140)',
)->build();
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 Sweep 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: conic-gradient(from 45deg, oklch(0.80 0.25 140), oklch(0.60 0.30 350), oklch(0.80 0.25 140));
background: conic-gradient(from 45deg, oklch(0.80 0.25 140), oklch(0.60 0.30 350), oklch(0.80 0.25 140));