Black

A dark, warm red with the energy of a warm sky.

Hex
#000000
sRGB
rgb(0 0 0)
OKLCH
oklch(0.0000 0.0000 0.0)

Black is a standard CSS named color with the canonical value #000000.

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

$black = Color::parse('#000000');
use PhpColor\Color\Color; $black = Color::parse('#000000');

ColorInterface

$black

#000000 · oklch(0.0000 0.0000 0.0)

Generate a Black scale

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

<?php

$oklch = $black->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 = $black->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 Black for the web

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

<?php

$hex   = $black->toHex();
$rgb   = $black->toCss('srgb');
$oklch = $black->to('oklch')->toCss();
$hex = $black->toHex(); $rgb = $black->toCss('srgb'); $oklch = $black->to('oklch')->toCss();
hex
#000000
rgb
rgb(0 0 0)
oklch
oklch(0 0 0)