Ultra Violet

A radial gradient sweeping from light violet to dark indigo, interpolated in OKLCH across 2 stops so the midpoint stays vivid instead of greying out.

Type
Radial
Stops
2
Space
OKLCH
Direction
circle at center

The stops behind Ultra Violet

Endpoints sit closest to mediumorchid and navy.

0% · #d069ff L 0.75 · C 0.3 · H 300
100% · #22007c L 0.25 · C 0.2 · H 280

Create Ultra Violet in PHP

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

<?php

use PhpColor\Color\Gradient\Gradient;

$gradient = Gradient::radial(
    'oklch(0.75 0.30 300)',
    'oklch(0.25 0.20 280)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::radial( 'oklch(0.75 0.30 300)', 'oklch(0.25 0.20 280)', );

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 Ultra Violet 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: radial-gradient(circle at center, oklch(0.75 0.30 300), oklch(0.25 0.20 280));
background: radial-gradient(circle at center, oklch(0.75 0.30 300), oklch(0.25 0.20 280));

Keep exploring

Build on Ultra Violet