Steel
A light, cool indigo -- the dependable foundation of trustworthy interfaces.
Create Steel 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;
$steel = Color::parse('#94A3B8');
use PhpColor\Color\Color;
$steel = Color::parse('#94A3B8');
ColorInterface
$steel
#94a3b8 · oklch(0.7107 0.0351 256.8)
Build a Steel harmony
tetradic() keeps Steel and adds three partners at equal quarter-turns around the OKLCH hue wheel.
<?php
$harmony = $steel->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
$harmony = $steel->tetradic();
foreach ($harmony as $color) {
echo $color->toHex().PHP_EOL;
}
- 0
#94a3b8 - 1
#b399a6 - 2
#ae9f8a - 3
#8ea99d
Generate a Steel scale
Keep the original hue and chroma, then vary OKLCH lightness to produce perceptually ordered steps.
<?php
$oklch = $steel->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 = $steel->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
Format Steel for the web
The same object can emit a compact Hex value, an sRGB CSS function, or its perceptual OKLCH coordinates.
<?php
$hex = $steel->toHex();
$rgb = $steel->toCss('srgb');
$oklch = $steel->to('oklch')->toCss();
$hex = $steel->toHex();
$rgb = $steel->toCss('srgb');
$oklch = $steel->to('oklch')->toCss();
- hex
#94a3b8- rgb
rgb(148 163 184)- oklch
oklch(0.710672 0.0351144 256.788)