phpColors
Categories
Component ID
2028985
Component name
phpColors
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
962
Component created
Component changed
Component body
This module provides integration for the phpColors library. The phpColors library provides an easy-to-use PHP class for dealing with color manipulation.
Requirements
- Composer Manager
- phpColors (installed via Composer Manager)
Installation
- Install as usual, see http://drupal.org/node/70151 for further information.
- Rebuild and install libraries via Composer Manager
- Run
drush composer-json-rebuild
- Run
drush composer-manager update
- Run
drush composer-manager install -o
- See the composer manager documentation for more information.
- Run
Usage
use MexitekPHPColorsColor;
$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.