matatirosoln / pantone-converter
Convert from a named Pantone coated colour to Hex, RGB or CMYK variants
0.0.1
2020-09-11 10:15 UTC
Requires
- php: >=7.2
Requires (Dev)
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2024-10-11 19:00:43 UTC
README
Convert a PANTONE® Coated colour to Hex, RGB or CMYK.
Installation
composer require matatirosoln/pantone-converter
Usage
use MSDev\PantoneConverter\PantoneConverter; $colour = PantoneConverter::ColourFromName('100-C'); print $colour->hex(); // outputs F6EB61 $rgb = $colour->rgb(); // RGB object print $rgb->green(); // outputs 246 print $colour->cmyk()->magenta(); //outputs 4.0
License
Copyright © 2020, Matatiro Solutions. Licensed under the MIT License.
Notes
- PANTONE® is a registered trademark of Pantone Inc.
- Conversion of Pantone to Hex from Code Beautify
- Conversion from Hex to RGB using PHP
sscanf()
- Conversion from RGB to CMYK based on this Stackoverflow answer