Golden Hour

A linear gradient sweeping from pastel yellow to mid orange, interpolated in OKLCH across 4 stops so the midpoint stays vivid instead of greying out.

Type
Linear
Stops
4
Space
OKLCH
Direction
90deg

The stops behind Golden Hour

Endpoints sit closest to navajowhite and crimson.

0% · #ffd87d L 0.9 · C 0.12 · H 85
33% · #ff9d20 L 0.8 · C 0.18 · H 60
67% · #f9601f L 0.68 · C 0.2 · H 40
100% · #c53637 L 0.55 · C 0.18 · H 25

Create Golden Hour in PHP

Build a linear gradient from the catalog stops, then let PHPColor assign their positions.

<?php

use PhpColor\Color\Gradient\Gradient;

$gradient = Gradient::linear(
    90,
    'oklch(0.90 0.12 85)',
    'oklch(0.80 0.18 60)',
    'oklch(0.68 0.20 40)',
    'oklch(0.55 0.18 25)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 90, 'oklch(0.90 0.12 85)', 'oklch(0.80 0.18 60)', 'oklch(0.68 0.20 40)', 'oklch(0.55 0.18 25)', );

Inspect and convert its stops

Each stop remains a color object, ready for conversion, contrast checks, or further manipulation.

<?php

foreach ($gradient->getStops() as $stop) {
    echo $stop->color->to('oklch')->toCss();
}
foreach ($gradient->getStops() as $stop) { echo $stop->color->to('oklch')->toCss(); }

Format Golden Hour for CSS

Serialize the gradient directly, or choose a wide-gamut notation for every stop.

<?php

$css = $gradient->toCss();
$p3  = $gradient->toCss('display-p3');
$css = $gradient->toCss(); $p3 = $gradient->toCss('display-p3');
background: linear-gradient(90deg, oklch(0.90 0.12 85), oklch(0.80 0.18 60), oklch(0.68 0.20 40), oklch(0.55 0.18 25));
background: linear-gradient(90deg, oklch(0.90 0.12 85), oklch(0.80 0.18 60), oklch(0.68 0.20 40), oklch(0.55 0.18 25));

Keep exploring

Build on Golden Hour