seinopsys/rgbacolor

A flexible class for parsing/storing color values

v1.0.0 2017-10-22 20:46 UTC

This package is auto-updated.

Last update: 2024-11-24 06:30:44 UTC


README

A flexible class for parsing/storing color values

Installation

composer require seinopsys/rgbacolor:1.*

Usage

use SeinopSys\RGBAColor;

$red = RGBAColor::parse('#f00');
$green = new RGBAColor(0, 255, 0);
$transparentBlue = new RGBAColor(0, 0, 255, .5);
$purple = (string)$green->invert();
$black = $red->setRed(0)->toHex();