ForestGreen

A mid green with the freshness of a spring green.

Hex
#228b22
sRGB
rgb(34 139 34)
OKLCH
oklch(0.5578 0.1688 142.9)

ForestGreen is a standard CSS named color with the canonical value #228b22.

Create ForestGreen 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;

$forestgreen = Color::parse('#228B22');
use PhpColor\Color\Color; $forestgreen = Color::parse('#228B22');

ColorInterface

$forestgreen

#228b22 · oklch(0.5578 0.1688 142.9)

Build a ForestGreen harmony

tetradic() keeps ForestGreen and adds three partners at equal quarter-turns around the OKLCH hue wheel.

<?php

$harmony = $forestgreen->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $forestgreen->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#228b22
  2. 1#0080c5
  3. 2#a14aac
  4. 3#bc4e00
ForestGreen and its three generated partners

Generate a ForestGreen scale

Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.

<?php

$oklch = $forestgreen->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 = $forestgreen->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 ForestGreen for the web

The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.

<?php

$hex   = $forestgreen->toHex();
$rgb   = $forestgreen->toCss('srgb');
$oklch = $forestgreen->to('oklch')->toCss();
$hex = $forestgreen->toHex(); $rgb = $forestgreen->toCss('srgb'); $oklch = $forestgreen->to('oklch')->toCss();
hex
#228b22
rgb
rgb(34 139 34)
oklch
oklch(0.557805 0.168781 142.893)

Keep exploring

Continue from ForestGreen