Plum

A mid, warm violet with the energy of a warm sky.

Hex
#a855f7
sRGB
rgb(168 85 247)
OKLCH
oklch(0.6268 0.2325 303.9)

This curated Plum is #a855f7. The CSS named color plum is the distinct color #dda0dd.

Create Plum 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;

$plum = Color::parse('#A855F7');
use PhpColor\Color\Color; $plum = Color::parse('#A855F7');

ColorInterface

$plum

#a855f7 · oklch(0.6268 0.2325 303.9)

Build a Plum harmony

tetradic() keeps Plum and adds three partners at equal quarter-turns around the OKLCH hue wheel.

<?php

$harmony = $plum->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $plum->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#a855f7
  2. 1#f43300
  3. 2#6d9b00
  4. 3#00a4dc
Plum and its three generated partners

Generate a Plum scale

Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.

<?php

$oklch = $plum->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 = $plum->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
Explore named color scales →

Format Plum for the web

The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.

<?php

$hex   = $plum->toHex();
$rgb   = $plum->toCss('srgb');
$oklch = $plum->to('oklch')->toCss();
$hex = $plum->toHex(); $rgb = $plum->toCss('srgb'); $oklch = $plum->to('oklch')->toCss();
hex
#a855f7
rgb
rgb(168 85 247)
oklch
oklch(0.626846 0.232542 303.9)