GhostWhite

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

Hex
#f8f8ff
sRGB
rgb(248 248 255)
OKLCH
oklch(0.9811 0.0093 286.2)

GhostWhite is a standard CSS named color with the canonical value #f8f8ff.

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

$ghostwhite = Color::parse('#F8F8FF');
use PhpColor\Color\Color; $ghostwhite = Color::parse('#F8F8FF');

ColorInterface

$ghostwhite

#f8f8ff · oklch(0.9811 0.0093 286.2)

Tint GhostWhite for a system

GhostWhite 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 = $ghostwhite->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 = $ghostwhite->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#fff6ec
  2. Fresh#f0fdf2
  3. Cool#effaff
GhostWhite kept at the same lightness, pulled warm, fresh and cool

Generate a GhostWhite scale

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

<?php

$oklch = $ghostwhite->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 = $ghostwhite->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 GhostWhite for the web

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

<?php

$hex   = $ghostwhite->toHex();
$rgb   = $ghostwhite->toCss('srgb');
$oklch = $ghostwhite->to('oklch')->toCss();
$hex = $ghostwhite->toHex(); $rgb = $ghostwhite->toCss('srgb'); $oklch = $ghostwhite->to('oklch')->toCss();
hex
#f8f8ff
rgb
rgb(248 248 255)
oklch
oklch(0.981119 0.00926791 286.228)

Keep exploring

Continue from GhostWhite