DarkGoldenRod
A mid yellow with the freshness of a spring yellow.
Create DarkGoldenRod 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;
$darkgoldenrod = Color::parse('#B8860B');
use PhpColor\Color\Color;
$darkgoldenrod = Color::parse('#B8860B');
ColorInterface
$darkgoldenrod
#b8860b · oklch(0.6521 0.1322 81.6)
Build a DarkGoldenRod harmony
tetradic() keeps DarkGoldenRod and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $darkgoldenrod->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $darkgoldenrod->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#b8860b - 1
#00a986 - 2
#618ee0 - 3
#cb6b99
Generate a DarkGoldenRod scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $darkgoldenrod->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 = $darkgoldenrod->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 DarkGoldenRod for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $darkgoldenrod->toHex();
$rgb = $darkgoldenrod->toCss('srgb');
$oklch = $darkgoldenrod->to('oklch')->toCss();
$hex = $darkgoldenrod->toHex();
$rgb = $darkgoldenrod->toCss('srgb');
$oklch = $darkgoldenrod->to('oklch')->toCss();
- hex
#b8860b- rgb
rgb(184 134 11)- oklch
oklch(0.65207 0.132199 81.5716)