0% · #ddb6ff
L 0.85 · C 0.15 · H 300
Amethyst
A linear gradient sweeping from light violet to dark magenta, interpolated in OKLCH across 3 stops so the midpoint stays vivid instead of greying out.
- Type
- Linear
- Stops
- 3
- Space
- OKLCH
- Direction
- 135deg
The stops behind Amethyst
Endpoints sit closest to plum and indigo.
50% · #983ace
L 0.55 · C 0.22 · H 310
100% · #570069
L 0.32 · C 0.18 · H 320
Create Amethyst 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(
135,
'oklch(0.85 0.15 300)',
'oklch(0.55 0.22 310)',
'oklch(0.32 0.18 320)',
);
use PhpColor\Color\Gradient\Gradient;
$gradient = Gradient::linear(
135,
'oklch(0.85 0.15 300)',
'oklch(0.55 0.22 310)',
'oklch(0.32 0.18 320)',
);
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 Amethyst 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(135deg, oklch(0.85 0.15 300), oklch(0.55 0.22 310), oklch(0.32 0.18 320));
background: linear-gradient(135deg, oklch(0.85 0.15 300), oklch(0.55 0.22 310), oklch(0.32 0.18 320));