PHP code example of matatirosoln / pantone-converter

1. Go to this page and download the library: Download matatirosoln/pantone-converter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

matatirosoln / pantone-converter example snippets


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