Iris

A deep, warm indigo with the energy of a warm sky.

Hex
#5d3fd3
sRGB
rgb(93 63 211)
OKLCH
oklch(0.4952 0.2137 284.8)

Iris is a curated PHPColor catalog color with the canonical value #5d3fd3.

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

$iris = Color::parse('#5D3FD3');
use PhpColor\Color\Color; $iris = Color::parse('#5D3FD3');

ColorInterface

$iris

#5d3fd3 · oklch(0.4952 0.2137 284.8)

Build an Iris harmony

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

<?php

$harmony = $iris->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $iris->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#5d3fd3
  2. 1#bc0039
  3. 2#786200
  4. 3#008187
Iris and its three generated partners

Generate an Iris scale

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

<?php

$oklch = $iris->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 = $iris->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 Iris for the web

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

<?php

$hex   = $iris->toHex();
$rgb   = $iris->toCss('srgb');
$oklch = $iris->to('oklch')->toCss();
$hex = $iris->toHex(); $rgb = $iris->toCss('srgb'); $oklch = $iris->to('oklch')->toCss();
hex
#5d3fd3
rgb
rgb(93 63 211)
oklch
oklch(0.495198 0.213662 284.775)

Keep exploring

Continue from Iris