PHP code example of foyyay / colorcast

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

    

foyyay / colorcast example snippets


$config = [
    "0" => [
        "primary" => ["saturation" => 80, "value" => 70],
        "accent" => ["saturation" => 75, "value" => 85],
    ],
    "20" => [
        "primary" => ["saturation" => 40, "value" => 50],
        "accent" => ["saturation" => 80, "value" => 90],
    ],
];