DarkGoldenRod

A mid yellow with the freshness of a spring yellow.

Hex
#b8860b
sRGB
rgb(184 134 11)
OKLCH
oklch(0.6521 0.1322 81.6)

DarkGoldenRod is a standard CSS named color with the canonical value #b8860b.

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; }
  1. 0#b8860b
  2. 1#00a986
  3. 2#618ee0
  4. 3#cb6b99
DarkGoldenRod and its three generated partners

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

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)

Keep exploring

Continue from DarkGoldenRod