#1a0e0c
L 0.18 · C 0.02 · H 30
Ember
Banked coals -- deep reds and ember-oranges on a dark bed.
- Mood
- Warm
- Colors
- 5
- Space
- OKLCH
Ember, color by color
Banked coals -- deep reds and ember-oranges on a dark bed.
#83000d
L 0.38 · C 0.16 · H 25
#c90000
L 0.52 · C 0.22 · H 30
#ff4500
L 0.68 · C 0.24 · H 35
#ff9a11
L 0.82 · C 0.2 · H 55
Create Ember 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.02 30)',
'oklch(0.38 0.16 25)',
'oklch(0.52 0.22 30)',
'oklch(0.68 0.24 35)',
'oklch(0.82 0.20 55)',
]);
use PhpColor\Color\Palette\ColorPalette;
$palette = ColorPalette::parse([
'oklch(0.18 0.02 30)',
'oklch(0.38 0.16 25)',
'oklch(0.52 0.22 30)',
'oklch(0.68 0.24 35)',
'oklch(0.82 0.20 55)',
]);
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 Ember 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();