Charcoal

A deep, cool blue -- the dependable foundation of trustworthy interfaces.

Hex
#36454f
sRGB
rgb(54 69 79)
OKLCH
oklch(0.3814 0.0258 237.5)

Charcoal is a curated PHPColor catalog color with the canonical value #36454f.

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

$charcoal = Color::parse('#36454F');
use PhpColor\Color\Color; $charcoal = Color::parse('#36454F');

ColorInterface

$charcoal

#36454f · oklch(0.3814 0.0258 237.5)

Tint Charcoal for a system

Charcoal is a neutral, so rotating its hue changes nothing. Design systems rarely ship a pure neutral either: give it a trace of chroma and it belongs to the palette around it.

<?php

$neutral = $charcoal->to('oklch');

foreach (['warm' => 60, 'fresh' => 150, 'cool' => 250] as $name => $hue) {
    echo $neutral->withChannel('c', 0.02)->withChannel('h', $hue)->toHex().PHP_EOL;
}
$neutral = $charcoal->to('oklch'); foreach (['warm' => 60, 'fresh' => 150, 'cool' => 250] as $name => $hue) { echo $neutral->withChannel('c', 0.02)->withChannel('h', $hue)->toHex().PHP_EOL; }
  1. Warm#4b4038
  2. Fresh#3b463d
  3. Cool#3b444d
Charcoal kept at the same lightness, pulled warm, fresh and cool

Generate a Charcoal scale

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

<?php

$oklch = $charcoal->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 = $charcoal->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 Charcoal for the web

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

<?php

$hex   = $charcoal->toHex();
$rgb   = $charcoal->toCss('srgb');
$oklch = $charcoal->to('oklch')->toCss();
$hex = $charcoal->toHex(); $rgb = $charcoal->toCss('srgb'); $oklch = $charcoal->to('oklch')->toCss();
hex
#36454f
rgb
rgb(54 69 79)
oklch
oklch(0.381377 0.0257808 237.542)

Keep exploring

Continue from Charcoal