Obsidian

Purest blacks and sharpest grays for monochromatic depth.

Mood
Dark
Colors
5
Space
OKLCH

Obsidian, color by color

Purest blacks and sharpest grays for monochromatic depth.

#000000 L 0.05 · C 0 · H 0
#080c0f L 0.15 · C 0.01 · H 250
#2a2e33 L 0.3 · C 0.01 · H 250
#6d7277 L 0.55 · C 0.01 · H 250
#c9ced4 L 0.85 · C 0.01 · H 250

Create Obsidian in PHP

Parse the catalog values as one ordered scale. The input remains readable while PHPColor normalizes every color.

<?php

use PhpColor\Color\Palette\ColorPalette;

$palette = ColorPalette::parse([
    'oklch(0.05 0 0)',
    'oklch(0.15 0.01 250)',
    'oklch(0.30 0.01 250)',
    'oklch(0.55 0.01 250)',
    'oklch(0.85 0.01 250)',
]);
use PhpColor\Color\Palette\ColorPalette; $palette = ColorPalette::parse([ 'oklch(0.05 0 0)', 'oklch(0.15 0.01 250)', 'oklch(0.30 0.01 250)', 'oklch(0.55 0.01 250)', 'oklch(0.85 0.01 250)', ]);

Inspect every palette color

Palette operations preserve order, so iteration and conversion produce values in the same visual sequence.

<?php

foreach ($palette->to('oklch') as $color) {
    echo $color->toCss().PHP_EOL;
}
foreach ($palette->to('oklch') as $color) { echo $color->toCss().PHP_EOL; }

Format Obsidian for CSS

Export hexadecimal values for compact tokens or convert the full palette to perceptual CSS notation.

<?php

$hex = $palette->toHex();
$css = $palette->to('oklch')->toCss();
$hex = $palette->toHex(); $css = $palette->to('oklch')->toCss();