Amber

A light, warm yellow with the energy of a warm sky.

Hex
#f59e0b
sRGB
rgb(245 158 11)
OKLCH
oklch(0.7686 0.1647 70.1)

Amber is a curated PHPColor catalog color with the canonical value #f59e0b.

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

$amber = Color::parse('#F59E0B');
use PhpColor\Color\Color; $amber = Color::parse('#F59E0B');

ColorInterface

$amber

#f59e0b · oklch(0.7686 0.1647 70.1)

Build an Amber harmony

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

<?php

$harmony = $amber->tetradic();

foreach ($harmony as $color) {
    echo $color->toHex().PHP_EOL;
}
$harmony = $amber->tetradic(); foreach ($harmony as $color) { echo $color->toHex().PHP_EOL; }
  1. 0#f59e0b
  2. 1#29d38f
  3. 2#56b9ff
  4. 3#f786d4
Amber and its three generated partners

Generate an Amber scale

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

<?php

$oklch = $amber->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 = $amber->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 Amber scale →

Format Amber for the web

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

<?php

$hex   = $amber->toHex();
$rgb   = $amber->toCss('srgb');
$oklch = $amber->to('oklch')->toCss();
$hex = $amber->toHex(); $rgb = $amber->toCss('srgb'); $oklch = $amber->to('oklch')->toCss();
hex
#f59e0b
rgb
rgb(245 158 11)
oklch
oklch(0.76859 0.164659 70.0804)