PHP code example of intaro / color-interpolator

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

    

intaro / color-interpolator example snippets


use Intaro\ColorInterpolator\Color;
use Intaro\ColorInterpolator\ColorInterpolator;

// start rgb color
$startColor = new Color('5fb8df');
// ending rgb color
$endingColor = new Color('3b9bcf');

$color = ColorInterpolator::interpolate($startColor, $endingColor);