A bundle written for Symfony 2.8 containing Twig filters to add and subtract hexadecimal colours.
Put the bundle in your src folder, and add the following line to your services.yml:
kookas.colour_calc:
class: Kookas\ColourBundle\Twig\ColourCalc
public: false
tags:
- { name: twig.extension }
Then include the bundle in your app/AppKernel.php file, as usual.
colour1|addColour(colour2)
colour1|subColour(colour2)
- Colours must be in six-digit format.
- Services.yml must be manually configured.