Moss

A mid lime with the freshness of a spring lime.

Hex
#8a9a5b
sRGB
rgb(138 154 91)
OKLCH
oklch(0.6583 0.0883 120.5)

Moss is a curated PHPColor catalog color with the canonical value #8a9a5b.

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

$moss = Color::parse('#8A9A5B');
use PhpColor\Color\Color; $moss = Color::parse('#8A9A5B');

ColorInterface

$moss

#8a9a5b · oklch(0.6583 0.0883 120.5)

Build a Moss harmony

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

<?php

$harmony = $moss->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $moss->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#8a9a5b
  2. 1#45a0b0
  3. 2#9a85c0
  4. 3#c27d71
Moss and its three generated partners

Generate a Moss scale

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

<?php

$oklch = $moss->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 = $moss->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 Moss for the web

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

<?php

$hex   = $moss->toHex();
$rgb   = $moss->toCss('srgb');
$oklch = $moss->to('oklch')->toCss();
$hex = $moss->toHex(); $rgb = $moss->toCss('srgb'); $oklch = $moss->to('oklch')->toCss();
hex
#8a9a5b
rgb
rgb(138 154 91)
oklch
oklch(0.658251 0.0883389 120.514)