Graphite

Cool neutrals for long reading sessions.

Mood
Dark
Colors
6
Space
OKLCH

Graphite, color by color

Neutrals chosen for endurance, not decoration. The greys run slightly cool and sit at even lightness steps, so text contrast stays predictable from the lightest surface to the darkest. Pair it with a single brand hue and let the content lead.

#0f1216 L 0.18 · C 0.01 · H 260
#26292e L 0.28 · C 0.01 · H 260
#4a4d53 L 0.42 · C 0.01 · H 260
#83868c L 0.62 · C 0.01 · H 260
#c0c4cb L 0.82 · C 0.01 · H 260
#f0f2f5 L 0.96 · C 0.005 · H 260

Create Graphite 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.18 0.01 260)',
    'oklch(0.28 0.01 260)',
    'oklch(0.42 0.01 260)',
    'oklch(0.62 0.01 260)',
    'oklch(0.82 0.01 260)',
    'oklch(0.96 0.005 260)',
]);
use PhpColor\Color\Palette\ColorPalette; $palette = ColorPalette::parse([ 'oklch(0.18 0.01 260)', 'oklch(0.28 0.01 260)', 'oklch(0.42 0.01 260)', 'oklch(0.62 0.01 260)', 'oklch(0.82 0.01 260)', 'oklch(0.96 0.005 260)', ]);

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 Graphite 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();