Mauve
A light, warm violet with the energy of a warm sky.
Create Mauve 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;
$mauve = Color::parse('#E0B0FF');
use PhpColor\Color\Color;
$mauve = Color::parse('#E0B0FF');
ColorInterface
$mauve
#e0b0ff · oklch(0.8273 0.1191 311.6)
Build a Mauve harmony
tetradic() keeps Mauve and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $mauve->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $mauve->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#e0b0ff - 1
#ffac89 - 2
#aad784 - 3
#5fd8fd
Generate a Mauve scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $mauve->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 = $mauve->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 Mauve for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $mauve->toHex();
$rgb = $mauve->toCss('srgb');
$oklch = $mauve->to('oklch')->toCss();
$hex = $mauve->toHex();
$rgb = $mauve->toCss('srgb');
$oklch = $mauve->to('oklch')->toCss();
- hex
#e0b0ff- rgb
rgb(224 176 255)- oklch
oklch(0.827347 0.119071 311.599)