YellowGreen

A light lime with the freshness of a spring lime.

Hex
#9acd32
sRGB
rgb(154 205 50)
OKLCH
oklch(0.7849 0.1837 126.6)

YellowGreen is a standard CSS named color with the canonical value #9acd32.

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; }
  1. 0#9acd32
  2. 1#00d3ff
  3. 2#d796ff
  4. 3#ff875e
YellowGreen and its three generated partners

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
Explore named color scales →

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)

Keep exploring

Continue from YellowGreen