Sepia
A deep, warm amber with the energy of a warm sky.
Create Sepia 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;
$sepia = Color::parse('#704214');
use PhpColor\Color\Color;
$sepia = Color::parse('#704214');
ColorInterface
$sepia
#704214 · oklch(0.4256 0.0864 61.1)
Build a Sepia harmony
tetradic() keeps Sepia and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $sepia->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $sepia->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#704214 - 1
#245c35 - 2
#175479 - 3
#693c64
Generate a Sepia scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $sepia->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 = $sepia->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 Sepia for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $sepia->toHex();
$rgb = $sepia->toCss('srgb');
$oklch = $sepia->to('oklch')->toCss();
$hex = $sepia->toHex();
$rgb = $sepia->toCss('srgb');
$oklch = $sepia->to('oklch')->toCss();
- hex
#704214- rgb
rgb(112 66 20)- oklch
oklch(0.425587 0.0864186 61.0762)