This module provides integration for the phpColors library. The phpColors library provides an easy-to-use PHP class for dealing with color manipulation.

Requirements

Installation

  1. Install as usual, see http://drupal.org/node/70151 for further information.
  2. Rebuild and install libraries via Composer Manager
    1. Run drush composer-json-rebuild
    2. Run drush composer-manager update
    3. Run drush composer-manager install -o
    4. See the composer manager documentation for more information.

Usage


use Mexitek\PHPColors\Color;

$my_blue = new Color("#336699");
echo $my_blue->darken();

or


  $my_blue = phpcolors_get_color('#336699');
  echo $my_blue->darken();

See http://mexitek.github.io/phpColors/ for more in depth documentation.

Differences between v1 and v2

The v1 branch (7.x-1.x) uses the xautoload and libraries projects to offer the phpColors class and is deprecated. The v2 branch (7.x-2.x) uses composer manager to provide the same functionality.

Project information

Releases