This library will allow you to alter colors, check readability, and generate different palettes based on a base color.
Via Composer
$ composer require mikealmond/twig-color-extension
{{ '0099FF'|color_darken(20)|color_css_rgba(0.9) }}
{{ '0099FF' is color_dark ? 'dark' : 'light' }}
{{ '0099FF'|color_complementary(30)|color_css_hex }}
{{ '0099FF' is color_low_contrast ? 'default-color' : '0099FF'|color_css_hex }}
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.