Harlequin

A pastel green with the freshness of a spring green.

Hex
#3fff00
sRGB
rgb(63 255 0)
OKLCH
oklch(0.8722 0.2870 141.0)

Harlequin is a curated PHPColor catalog color with the canonical value #3fff00.

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

$harlequin = Color::parse('#3FFF00');
use PhpColor\Color\Color; $harlequin = Color::parse('#3FFF00');

ColorInterface

$harlequin

#3fff00 · oklch(0.8722 0.2870 141.0)

Build a Harlequin harmony

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

<?php

$harmony = $harlequin->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $harlequin->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#3fff00
  2. 1#00ecff
  3. 2#ff84ff
  4. 3#ff8600
Harlequin and its three generated partners

Generate a Harlequin scale

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

<?php

$oklch = $harlequin->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 = $harlequin->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 Harlequin for the web

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

<?php

$hex   = $harlequin->toHex();
$rgb   = $harlequin->toCss('srgb');
$oklch = $harlequin->to('oklch')->toCss();
$hex = $harlequin->toHex(); $rgb = $harlequin->toCss('srgb'); $oklch = $harlequin->to('oklch')->toCss();
hex
#3fff00
rgb
rgb(63 255 0)
oklch
oklch(0.872159 0.287021 141.018)

Keep exploring

Continue from Harlequin