0% · #89ea74
L 0.85 · C 0.18 · H 140
Forest Canopy
A pastel linear gradient in green tones, interpolated in OKLCH across 3 stops so the ramp stays even from end to end.
- Type
- Linear
- Stops
- 3
- Space
- OKLCH
- Direction
- 90deg
The stops behind Forest Canopy
Endpoints sit closest to lightgreen and darkgreen.
50% · #009e34
L 0.6 · C 0.2 · H 150
100% · #005c2b
L 0.4 · C 0.14 · H 160
Create Forest Canopy 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.85 0.18 140)',
'oklch(0.60 0.20 150)',
'oklch(0.40 0.14 160)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
90,
'oklch(0.85 0.18 140)',
'oklch(0.60 0.20 150)',
'oklch(0.40 0.14 160)',
);
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 Forest Canopy 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.85 0.18 140), oklch(0.60 0.20 150), oklch(0.40 0.14 160));
background: linear-gradient(90deg, oklch(0.85 0.18 140), oklch(0.60 0.20 150), oklch(0.40 0.14 160));