PHP code example of intellexapps / color

1. Go to this page and download the library: Download intellexapps/color 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/ */

    

intellexapps / color example snippets


$chocolateColor = RGBA::Chocolate();
$mistyRoseColor = RGBA::MistyRose();
$navyColor = RGBA::Navy();

$color = ColorParser::parse('#781190');
echo $color->toCSS();

$color = ColorParser::parse('rgb(80, 138, 99);');
$image = imageCreateTrueColor(200, 200);
$gdColor = $color->getRGBA()->toImageColorIdentifier($image)

$color = ColorParser::parse('cmyk(20%, 40%, 60%, 20%');
echo $color->getRGBA()->toHexString();

$rgba = new RGBA(190, 11, 32, 0.65);
$cmyk = $rgba->getCMYK(); 

$rgba = ColorParser::parse($input)->getRGBA(); 

$rgba->toImageColorIdentifier($image);
$rgba->toHexString($

$cmyk->toCSS;
$cmyk->getRGBA;