Pink

A pastel, warm red with the energy of a warm sky.

Hex
#ffc0cb
sRGB
rgb(255 192 203)
OKLCH
oklch(0.8677 0.0735 7.1)

Pink is a standard CSS named color with the canonical value #ffc0cb.

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

$pink = Color::parse('#FFC0CB');
use PhpColor\Color\Color; $pink = Color::parse('#FFC0CB');

ColorInterface

$pink

#ffc0cb · oklch(0.8677 0.0735 7.1)

Build a Pink harmony

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

<?php

$harmony = $pink->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $pink->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#ffc0cb
  2. 1#e1d49d
  3. 2#9be4dc
  4. 3#c7d0ff
Pink and its three generated partners

Generate a Pink scale

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

<?php

$oklch = $pink->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 = $pink->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 the complete Pink scale →

Format Pink for the web

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

<?php

$hex   = $pink->toHex();
$rgb   = $pink->toCss('srgb');
$oklch = $pink->to('oklch')->toCss();
$hex = $pink->toHex(); $rgb = $pink->toCss('srgb'); $oklch = $pink->to('oklch')->toCss();
hex
#ffc0cb
rgb
rgb(255 192 203)
oklch
oklch(0.867738 0.073542 7.08551)

Keep exploring

Continue from Pink