Deep Purple
A dark, warm magenta with the energy of a warm sky.
Create Deep Purple 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;
$deepPurple = Color::parse('#36013F');
use PhpColor\Color\Color;
$deepPurple = Color::parse('#36013F');
ColorInterface
$deepPurple
#36013f · oklch(0.2421 0.1134 321.1)
Build a Deep Purple harmony
tetradic() keeps Deep Purple and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $deepPurple->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $deepPurple->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#36013f - 1
#450000 - 2
#002b00 - 3
#00244b
Generate a Deep Purple scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $deepPurple->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 = $deepPurple->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 Deep Purple for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $deepPurple->toHex();
$rgb = $deepPurple->toCss('srgb');
$oklch = $deepPurple->to('oklch')->toCss();
$hex = $deepPurple->toHex();
$rgb = $deepPurple->toCss('srgb');
$oklch = $deepPurple->to('oklch')->toCss();
- hex
#36013f- rgb
rgb(54 1 63)- oklch
oklch(0.242074 0.113378 321.145)