Rose to Gold

A linear gradient sweeping from mid red to light yellow, 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 Rose to Gold

Endpoints sit closest to deeppink and goldenrod.

0% · #fd00a6 L 0.65 · C 0.28 · H 350
100% · #f2b200 L 0.8 · C 0.18 · H 85

Create Rose to Gold 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.65 0.28 350)',
    'oklch(0.80 0.18 85)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 90, 'oklch(0.65 0.28 350)', 'oklch(0.80 0.18 85)', );

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 Rose to Gold 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.65 0.28 350), oklch(0.80 0.18 85));
background: linear-gradient(90deg, oklch(0.65 0.28 350), oklch(0.80 0.18 85));

Keep exploring

Build on Rose to Gold