Radioactive

A pastel linear gradient in green tones, interpolated in OKLCH across 2 stops so the ramp stays even from end to end.

Type
Linear
Stops
2
Space
OKLCH
Direction
45deg

The stops behind Radioactive

Endpoints sit closest to chartreuse and darkgreen.

0% · #88ff00 L 0.92 · C 0.28 · H 135
100% · #0c4714 L 0.35 · C 0.1 · H 145

Create Radioactive 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(
    45,
    'oklch(0.92 0.28 135)',
    'oklch(0.35 0.10 145)',
);
use PhpColor\Color\Gradient\Gradient; $gradient = Gradient::linear( 45, 'oklch(0.92 0.28 135)', 'oklch(0.35 0.10 145)', );

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 Radioactive 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(45deg, oklch(0.92 0.28 135), oklch(0.35 0.10 145));
background: linear-gradient(45deg, oklch(0.92 0.28 135), oklch(0.35 0.10 145));

Keep exploring

Build on Radioactive