pixelbrackets/ral-color-chart

This package provides a static list of RAL Classic Colors

2.0.2 2024-08-13 13:26 UTC

This package is auto-updated.

Last update: 2024-12-13 12:16:38 UTC


README

Version Build Status Made With License

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.

Screenshot

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

  1. 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();
    
  2. Get an array with all RAL Classic Ranges
    $ranges = \Pixelbrackets\RalColorChart\RalColorChart::getRanges();
    
  3. Get an array with all RAL Classic Colors grouped by range index
    $groupedColors = \Pixelbrackets\RalColorChart\RalColorChart::getColorsGroupedByRange();
    
  4. 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.