DeepPink
A mid, warm red with the energy of a warm sky.
Create DeepPink 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;
$deeppink = Color::parse('#FF1493');
use PhpColor\Color\Color;
$deeppink = Color::parse('#FF1493');
ColorInterface
$deeppink
#ff1493 · oklch(0.6549 0.2613 356.9)
Build a DeepPink harmony
tetradic() keeps DeepPink and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $deeppink->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $deeppink->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#ff1493 - 1
#d37a00 - 2
#00bd8d - 3
#4a7bff
Generate a DeepPink scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $deeppink->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 = $deeppink->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 DeepPink for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $deeppink->toHex();
$rgb = $deeppink->toCss('srgb');
$oklch = $deeppink->to('oklch')->toCss();
$hex = $deeppink->toHex();
$rgb = $deeppink->toCss('srgb');
$oklch = $deeppink->to('oklch')->toCss();
- hex
#ff1493- rgb
rgb(255 20 147)- oklch
oklch(0.654935 0.261336 356.945)