Blood
A deep, warm orange with the energy of a warm sky.
Create Blood 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;
$blood = Color::parse('#8A0303');
use PhpColor\Color\Color;
$blood = Color::parse('#8A0303');
ColorInterface
$blood
#8a0303 · oklch(0.3992 0.1617 28.9)
Build a Blood harmony
tetradic() keeps Blood and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $blood->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $blood->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#8a0303 - 1
#405000 - 2
#005a75 - 3
#562890
Generate a Blood scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $blood->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 = $blood->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 Blood for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $blood->toHex();
$rgb = $blood->toCss('srgb');
$oklch = $blood->to('oklch')->toCss();
$hex = $blood->toHex();
$rgb = $blood->toCss('srgb');
$oklch = $blood->to('oklch')->toCss();
- hex
#8a0303- rgb
rgb(138 3 3)- oklch
oklch(0.399245 0.161713 28.9449)