pixelbrackets / ral-color-chart
This package provides a static list of RAL Classic Colors
2.0.2
2024-08-13 13:26 UTC
Requires
- php: >=7.0.0
Requires (Dev)
- phpunit/phpunit: ^9.3
README
This package provides a static list of RAL Classic Colors.
The object returns an array which contains the RAL Number, Range Index, English Name, German Name and a compatible Hex Color Code.
Requirements
- PHP
Installation
Packagist Entry https://packagist.org/packages/pixelbrackets/ral-color-chart/
Source
https://gitlab.com/pixelbrackets/ral-color-chart/
Usage
See tests/demo.php
- Get an array with all RAL Classic Colors
$colorChart = new \Pixelbrackets\RalColorChart\RalColorChart(); $colors = $colorChart->getColors();
Or as static method call
$colors = \Pixelbrackets\RalColorChart\RalColorChart::getColors();
- Get an array with all RAL Classic Ranges
$ranges = \Pixelbrackets\RalColorChart\RalColorChart::getRanges();
- Get an array with all RAL Classic Colors grouped by range index
$groupedColors = \Pixelbrackets\RalColorChart\RalColorChart::getColorsGroupedByRange();
- Get an array of a single RAL Classic Color
$color = \Pixelbrackets\RalColorChart\RalColorChart::getColor('RAL 2010');
License
GNU General Public License version 2 or later
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html.
Author
Dan Kleine (mail@pixelbrackets.de / @pixelbrackets)
Changelog
See ./CHANGELOG.md
Contribution
This script is Open Source, so please use, patch, extend or fork it.