georgec/colour

Parse and manipulate CSS colour strings

1.0.0 2024-05-15 19:40 UTC

This package is not auto-updated.

Last update: 2025-06-13 02:22:55 UTC


README

builds.sr.ht status

Parse and manipulate CSS colour string from PHP.

Supported formats

Usage

Install with composer require georgec/colour.

use Gc\Colour\Colour;

$initialColour = new Colour("rgb(188 93 27)");
$hexColour = $initialColour->asHex();

$hexColour->format(); // #bc5d1b

Contributing

Please send patches to my public-inbox mailing list.

Also see the issue tracker.