MediumOrchid

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

Hex
#ba55d3
sRGB
rgb(186 85 211)
OKLCH
oklch(0.6256 0.2024 319.2)

MediumOrchid is a standard CSS named color with the canonical value #ba55d3.

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

$mediumorchid = Color::parse('#BA55D3');
use PhpColor\Color\Color; $mediumorchid = Color::parse('#BA55D3');

ColorInterface

$mediumorchid

#ba55d3 · oklch(0.6256 0.2024 319.2)

Build a MediumOrchid harmony

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

<?php

$harmony = $mediumorchid->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $mediumorchid->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#ba55d3
  2. 1#e25400
  3. 2#35a200
  4. 3#0098e7
MediumOrchid and its three generated partners

Generate a MediumOrchid scale

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

<?php

$oklch = $mediumorchid->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 = $mediumorchid->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 MediumOrchid for the web

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

<?php

$hex   = $mediumorchid->toHex();
$rgb   = $mediumorchid->toCss('srgb');
$oklch = $mediumorchid->to('oklch')->toCss();
$hex = $mediumorchid->toHex(); $rgb = $mediumorchid->toCss('srgb'); $oklch = $mediumorchid->to('oklch')->toCss();
hex
#ba55d3
rgb
rgb(186 85 211)
oklch
oklch(0.62558 0.202438 319.226)

Keep exploring

Continue from MediumOrchid