0% · #fff897
L 0.98 · C 0.12 · H 95
Lemonade
A linear gradient sweeping from pastel lime to pastel red, 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 Lemonade
Endpoints sit closest to khaki and mistyrose.
100% · #ffd6da
L 0.94 · C 0.08 · H 15
Create Lemonade 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.98 0.12 95)',
'oklch(0.94 0.08 15)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
45,
'oklch(0.98 0.12 95)',
'oklch(0.94 0.08 15)',
);
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 Lemonade 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.98 0.12 95), oklch(0.94 0.08 15));
background: linear-gradient(45deg, oklch(0.98 0.12 95), oklch(0.94 0.08 15));