YellowGreen
A light lime with the freshness of a spring lime.
Create YellowGreen 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;
$yellowgreen = Color::parse('#9ACD32');
use PhpColor\Color\Color;
$yellowgreen = Color::parse('#9ACD32');
ColorInterface
$yellowgreen
#9acd32 · oklch(0.7849 0.1837 126.6)
Build a YellowGreen harmony
tetradic() keeps YellowGreen and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $yellowgreen->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $yellowgreen->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#9acd32 - 1
#00d3ff - 2
#d796ff - 3
#ff875e
Generate a YellowGreen scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $yellowgreen->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 = $yellowgreen->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 YellowGreen for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $yellowgreen->toHex();
$rgb = $yellowgreen->toCss('srgb');
$oklch = $yellowgreen->to('oklch')->toCss();
$hex = $yellowgreen->toHex();
$rgb = $yellowgreen->toCss('srgb');
$oklch = $yellowgreen->to('oklch')->toCss();
- hex
#9acd32- rgb
rgb(154 205 50)- oklch
oklch(0.784852 0.183741 126.636)