0% · #7bc27e
L 0.75 · C 0.12 · H 145
Deep Forest
A light 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
- 180deg
The stops behind Deep Forest
Endpoints sit closest to darkseagreen and black.
50% · #006100
L 0.42 · C 0.18 · H 140
100% · #001200
L 0.15 · C 0.1 · H 135
Create Deep Forest 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(
180,
'oklch(0.75 0.12 145)',
'oklch(0.42 0.18 140)',
'oklch(0.15 0.10 135)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
180,
'oklch(0.75 0.12 145)',
'oklch(0.42 0.18 140)',
'oklch(0.15 0.10 135)',
);
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 Deep Forest 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(180deg, oklch(0.75 0.12 145), oklch(0.42 0.18 140), oklch(0.15 0.10 135));
background: linear-gradient(180deg, oklch(0.75 0.12 145), oklch(0.42 0.18 140), oklch(0.15 0.10 135));