Crimson

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

Hex
#dc2626
sRGB
rgb(220 38 38)
OKLCH
oklch(0.5771 0.2152 27.3)

This curated Crimson is #dc2626. The CSS named color crimson is the distinct color #dc143c.

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

$crimson = Color::parse('#DC2626');
use PhpColor\Color\Color; $crimson = Color::parse('#DC2626');

ColorInterface

$crimson

#dc2626 · oklch(0.5771 0.2152 27.3)

Build a Crimson harmony

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

<?php

$harmony = $crimson->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $crimson->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#dc2626
  2. 1#738600
  3. 2#0096b9
  4. 3#8b50e6
Crimson and its three generated partners

Generate a Crimson scale

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

<?php

$oklch = $crimson->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 = $crimson->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 Crimson for the web

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

<?php

$hex   = $crimson->toHex();
$rgb   = $crimson->toCss('srgb');
$oklch = $crimson->to('oklch')->toCss();
$hex = $crimson->toHex(); $rgb = $crimson->toCss('srgb'); $oklch = $crimson->to('oklch')->toCss();
hex
#dc2626
rgb
rgb(220 38 38)
oklch
oklch(0.577099 0.215157 27.325)

Keep exploring

Continue from Crimson