DarkBlue

A dark, cool indigo -- the dependable foundation of trustworthy interfaces.

Hex
#00008b
sRGB
rgb(0 0 139)
OKLCH
oklch(0.2878 0.1994 264.1)

DarkBlue is a standard CSS named color with the canonical value #00008b.

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

$darkblue = Color::parse('#00008B');
use PhpColor\Color\Color; $darkblue = Color::parse('#00008B');

ColorInterface

$darkblue

#00008b · oklch(0.2878 0.1994 264.1)

Build a DarkBlue harmony

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

<?php

$harmony = $darkblue->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $darkblue->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#00008b
  2. 1#670031
  3. 2#550c00
  4. 3#004323
DarkBlue and its three generated partners

Generate a DarkBlue scale

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

<?php

$oklch = $darkblue->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 = $darkblue->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 DarkBlue for the web

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

<?php

$hex   = $darkblue->toHex();
$rgb   = $darkblue->toCss('srgb');
$oklch = $darkblue->to('oklch')->toCss();
$hex = $darkblue->toHex(); $rgb = $darkblue->toCss('srgb'); $oklch = $darkblue->to('oklch')->toCss();
hex
#00008b
rgb
rgb(0 0 139)
oklch
oklch(0.287824 0.199442 264.052)

Keep exploring

Continue from DarkBlue