Bone
A pastel yellow with the freshness of a spring yellow.
Create Bone in PHP
Parse the catalog’s canonical value once, then keep the resulting color object throughout the rest of your code.
<?php
use PhpColor\Color\Color;
$bone = Color::parse('#E3DAC9');
use PhpColor\Color\Color;
$bone = Color::parse('#E3DAC9');
ColorInterface
$bone
#e3dac9 · oklch(0.8909 0.0249 83.4)
Tint Bone for a system
Bone is a neutral, so rotating its hue changes nothing. Design systems rarely ship a pure neutral either: give it a trace of chroma and it belongs to the palette around it.
<?php
$neutral = $bone->to('oklch');
foreach (['warm' => 60, 'fresh' => 150, 'cool' => 250] as $name => $hue) {
echo $neutral->withChannel('c', 0.02)->withChannel('h', $hue)->toHex().PHP_EOL;
}
$neutral = $bone->to('oklch');
foreach (['warm' => 60, 'fresh' => 150, 'cool' => 250] as $name => $hue) {
echo $neutral->withChannel('c', 0.02)->withChannel('h', $hue)->toHex().PHP_EOL;
}
- Warm
#e5d8ce - Fresh
#d2dfd4 - Cool
#d1dce8
Generate a Bone scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $bone->to('oklch');
foreach ([0.97, 0.92, 0.84, 0.74, 0.66, 0.58, 0.48, 0.40, 0.32, 0.24, 0.16] as $lightness) {
$step = $oklch->withChannel('l', $lightness);
}
$oklch = $bone->to('oklch');
foreach ([0.97, 0.92, 0.84, 0.74, 0.66, 0.58, 0.48, 0.40, 0.32, 0.24, 0.16] as $lightness) {
$step = $oklch->withChannel('l', $lightness);
}
50
100
200
300
400
500
600
700
800
900
950
Format Bone for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $bone->toHex();
$rgb = $bone->toCss('srgb');
$oklch = $bone->to('oklch')->toCss();
$hex = $bone->toHex();
$rgb = $bone->toCss('srgb');
$oklch = $bone->to('oklch')->toCss();
- hex
#e3dac9- rgb
rgb(227 218 201)- oklch
oklch(0.890942 0.0248879 83.4148)