Royal Purple

Velvet shadows and imperial accents.

Mood
Dark
Colors
5
Space
OKLCH

Royal Purple, color by color

Velvet shadows and imperial accents.

#08001a L 0.1 · C 0.08 · H 300
#210042 L 0.2 · C 0.12 · H 300
#460d8b L 0.35 · C 0.18 · H 295
#725ec2 L 0.55 · C 0.15 · H 290
#b7b5fc L 0.8 · C 0.1 · H 285

Create Royal Purple 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.10 0.08 300)',
    'oklch(0.20 0.12 300)',
    'oklch(0.35 0.18 295)',
    'oklch(0.55 0.15 290)',
    'oklch(0.80 0.10 285)',
]);
use PhpColor\Color\Palette\ColorPalette; $palette = ColorPalette::parse([ 'oklch(0.10 0.08 300)', 'oklch(0.20 0.12 300)', 'oklch(0.35 0.18 295)', 'oklch(0.55 0.15 290)', 'oklch(0.80 0.10 285)', ]);

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 Royal Purple 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();

Keep exploring

Build on Royal Purple