PHP code example of jimmyandrade / tonesque

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

    

jimmyandrade / tonesque example snippets



	$src = 'image/path/image.jpg';

	$tonesque = new Tonesque( $src );

	// get color in hex format
	$color = $tonesque->color();

	// get black or white depending on main color
	$black_or_white = $tonesque->contrast();