1. Go to this page and download the library: Download andrey-helldar/which-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/ */
andrey-helldar / which-color example snippets
use DragonCode\WhichColor\Facades\Color;
return Color::of('#000000')->lightIsBetter(); // returned `true`. A white text color is better for black background.
return Color::of('#ffffff')->darkIsBetter(); // returned `true`. A black text color is better for white background.
return Color::of('#ffffff')->lightIsBetter(); // returned `false`. White color is not the best for white background.
return Color::of('#000000')->darkIsBetter(); // returned `false`. Black color is not the best for black background.