Web safe colors generator

v0.1.3-alpha 2016-03-25 18:13 UTC

This package is not auto-updated.

Last update: 2021-09-18 02:31:18 UTC


This is a very simple composer package used to generate array with websafe color codes. It can generate both RGB and HEX codes.


Simply use the usual composer way:

composer require todstoychev/websafe-colors

or add to your composer.json in the 'require' section:

    "require": {
        "todstoychev/websafe-colors": "dev-master"

and run

composer update


The package contains only one class. You will need only the Wsc::getColors() method. This method accepts only one argument which defines the type of the produced codes. Default is false and the result is array with the hex formated codes. If you want to get RGB values use true as argument. The result in this case will be:

        ['r' => 0, 'g' => 0, 'b' => 0], 
        ['r' => 0, 'g' => 51, 'b' => 0],
        ['r' => 0, 'g' => 0, 'b' => 51],