Golden Gate

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

Type
Linear
Stops
2
Space
OKLCH
Direction
90deg

The stops behind Golden Gate

Endpoints sit closest to sandybrown and red.

0% · #ffb45f L 0.85 · C 0.15 · H 60
100% · #d31900 L 0.55 · C 0.22 · H 35

Create Golden Gate 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.85 0.15 60)',
    'oklch(0.55 0.22 35)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 90, 'oklch(0.85 0.15 60)', 'oklch(0.55 0.22 35)', );

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 Gate 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.85 0.15 60), oklch(0.55 0.22 35));
background: linear-gradient(90deg, oklch(0.85 0.15 60), oklch(0.55 0.22 35));

Keep exploring

Build on Golden Gate