Candy Shop

Playful, sugary brights that pop against any background.

Mood
Vivid
Colors
5
Space
OKLCH

Candy Shop, color by color

Playful, sugary brights that pop against any background.

#ffc7b2 L 0.95 · C 0.15 · H 30
#ff8cfa L 0.85 · C 0.22 · H 340
#a7aaff L 0.8 · C 0.2 · H 280
#00fcf2 L 0.88 · C 0.18 · H 190
#d1fa00 L 0.92 · C 0.25 · H 120

Create Candy Shop 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.95 0.15 30)',
    'oklch(0.85 0.22 340)',
    'oklch(0.80 0.20 280)',
    'oklch(0.88 0.18 190)',
    'oklch(0.92 0.25 120)',
]);
use PhpColor\Color\Palette\ColorPalette; $palette = ColorPalette::parse([ 'oklch(0.95 0.15 30)', 'oklch(0.85 0.22 340)', 'oklch(0.80 0.20 280)', 'oklch(0.88 0.18 190)', 'oklch(0.92 0.25 120)', ]);

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 Candy Shop 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();