Convert a PANTONE® Coated colour to Hex, RGB or CMYK.
composer require matatirosoln/pantone-converter
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
Copyright © 2020, Matatiro Solutions. Licensed under the MIT License.
- 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