1. Go to this page and download the library: Download wwaz/colormodel-php 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/ */
use wwaz\Colormodel\Model\RGB;
use wwaz\Colormodel\Scheme\Complementary;
use wwaz\Colormodel\Scheme\Triadic;
use wwaz\Colormodel\Scheme\Analogous;
use wwaz\Colormodel\Scheme\Tint;
$base = new RGB(255, 0, 0); // red
(new Complementary($base))->get(); // ['255,0,0', '0,255,255']
(new Triadic($base))->get(); // red + 2 harmonics
(new Analogous($base))->get(); // neighboring hues
(new Tint($base))->get(); // lighter variations
// Works with CMYK too — output stays in CMYK
use wwaz\Colormodel\Model\CMYKInt;
$cyan = new CMYKInt(100, 0, 0, 0);
(new Complementary($cyan))->get(); // ['100,0,0,0', '0,100,100,0']
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.