PHP code example of conkal / color

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

    

conkal / color example snippets


$color = Color::fromHex('#990000');

// lighten by 10%
$color = Color::fromHex('#990000')->lighten(30);

// darken by 10%
$color = Color::fromHex('#990000')->darken(30);

$colors = Color::fromHex('#990000')->shades(3);

$color = Color::fromHex('#ff0000')->invert();