0% · #ff2335
L 0.65 · C 0.25 · H 25
Velocity
A linear gradient sweeping from mid orange to light teal, interpolated in OKLCH across 3 stops so the midpoint stays vivid instead of greying out.
- Type
- Linear
- Stops
- 3
- Space
- OKLCH
- Direction
- 90deg
The stops behind Velocity
Endpoints sit closest to red and mediumaquamarine.
50% · #cdae00
L 0.75 · C 0.2 · H 100
100% · #00ba95
L 0.65 · C 0.25 · H 180
Create Velocity 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.65 0.25 25)',
'oklch(0.75 0.20 100)',
'oklch(0.65 0.25 180)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
90,
'oklch(0.65 0.25 25)',
'oklch(0.75 0.20 100)',
'oklch(0.65 0.25 180)',
);
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 Velocity 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.65 0.25 25), oklch(0.75 0.20 100), oklch(0.65 0.25 180));
background: linear-gradient(90deg, oklch(0.65 0.25 25), oklch(0.75 0.20 100), oklch(0.65 0.25 180));