White

A pastel yellow with the freshness of a spring yellow.

Hex
#ffffff
sRGB
rgb(255 255 255)
OKLCH
oklch(1.0000 0.0000 89.9)

White is a standard CSS named color with the canonical value #ffffff.

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

$white = Color::parse('#FFFFFF');
use PhpColor\Color\Color; $white = Color::parse('#FFFFFF');

ColorInterface

$white

#ffffff · oklch(1.0000 0.0000 89.9)

Tint White for a system

White is a neutral, so rotating its hue changes nothing. Design systems rarely ship a pure neutral either: give it a trace of chroma and it belongs to the palette around it.

<?php

$neutral = $white->to('oklch');

foreach (['warm' => 60, 'fresh' => 150, 'cool' => 250] as $name => $hue) {
    echo $neutral->withChannel('c', 0.02)->withChannel('h', $hue)->toHex().PHP_EOL;
}
$neutral = $white->to('oklch'); foreach (['warm' => 60, 'fresh' => 150, 'cool' => 250] as $name => $hue) { echo $neutral->withChannel('c', 0.02)->withChannel('h', $hue)->toHex().PHP_EOL; }
  1. Warm#fffcf2
  2. Fresh#f6fff8
  3. Cool#f5ffff
White kept at the same lightness, pulled warm, fresh and cool

Generate a White scale

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

<?php

$oklch = $white->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 = $white->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 White for the web

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

<?php

$hex   = $white->toHex();
$rgb   = $white->toCss('srgb');
$oklch = $white->to('oklch')->toCss();
$hex = $white->toHex(); $rgb = $white->toCss('srgb'); $oklch = $white->to('oklch')->toCss();
hex
#ffffff
rgb
rgb(255 255 255)
oklch
oklch(1 0 89.8756)