mikealmond / twig-color-extension
A series of Twig filters for color manipulations
Installs: 79 935
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 2
Open Issues: 0
Type:project
Requires
- php: >=7.0
- ext-ctype: *
- ext-json: *
- mikealmond/color: ^0.1.0
- twig/twig: ^1.2|^2.5|^3.0
Requires (Dev)
- phpunit/phpunit: ~6.0
- squizlabs/php_codesniffer: ^3.0
README
This library will allow you to alter colors, check readability, and generate different palettes based on a base color.
Install
Via Composer
$ composer require mikealmond/twig-color-extension
Usage
{{ '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 }}
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.