LawnGreen
A pastel green with the freshness of a spring green.
Create LawnGreen in PHP
Parse the catalog’s canonical value once, then keep the resulting color object throughout the rest of your code.
<?php
use PhpColor\Color\Color;
$lawngreen = Color::parse('#7CFC00');
use PhpColor\Color\Color;
$lawngreen = Color::parse('#7CFC00');
ColorInterface
$lawngreen
#7cfc00 · oklch(0.8818 0.2631 136.2)
Build a LawnGreen harmony
tetradic() keeps LawnGreen and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $lawngreen->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $lawngreen->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#7cfc00 - 1
#00f4ff - 2
#ff96ff - 3
#ff8f00
Generate a LawnGreen scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $lawngreen->to('oklch');
foreach ([0.97, 0.92, 0.84, 0.74, 0.66, 0.58, 0.48, 0.40, 0.32, 0.24, 0.16] as $lightness) {
$step = $oklch->withChannel('l', $lightness);
}
$oklch = $lawngreen->to('oklch');
foreach ([0.97, 0.92, 0.84, 0.74, 0.66, 0.58, 0.48, 0.40, 0.32, 0.24, 0.16] as $lightness) {
$step = $oklch->withChannel('l', $lightness);
}
50
100
200
300
400
500
600
700
800
900
950
Format LawnGreen for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $lawngreen->toHex();
$rgb = $lawngreen->toCss('srgb');
$oklch = $lawngreen->to('oklch')->toCss();
$hex = $lawngreen->toHex();
$rgb = $lawngreen->toCss('srgb');
$oklch = $lawngreen->to('oklch')->toCss();
- hex
#7cfc00- rgb
rgb(124 252 0)- oklch
oklch(0.881753 0.263068 136.171)