PHP code example of gabrieldarezzo / colorizzar

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

    

gabrieldarezzo / colorizzar example snippets



Colorizzar\ChangeColor;

$changeColor = new ChangeColor('red_car.png');

//From Red Hexadecimal
$changeColor->setFromHex('#FF1F28');

// Will create 'blue.png' in new_cars/ folder
$changeColor->colorizeByNameColor('Blue', 'new_cars/');




olorizzar\ChangeColor;

$changeColor = new ChangeColor('red_car.png');

//From Red Hexadecimal
$changeColor->setFromHex('#FF1F28');
$changeColor->setToHex('#1F75FE');

// Will create 'blue.png' in new_cars/ folder
$changeColor->colorizeKeepAplhaChannnel('new_cars/blue.png');



....

$changeColor = new ChangeColor('red_car.png');
$changeColor->setFromHex('#FF1F28');
$changeColor->colorizeToAllColors('cars/');