Colorizer Classes
4 sites
Security covered
This module provides a Twig filter to convert color values into CSS classes. It's useful for integrating with modules like Color Field, allowing you to visually select colors in the admin interface and output them as corresponding CSS classes in your markup.
Adds in the ability to take a color value from Drupal and output it as a CSS Class using a Twig filter. It was built to be used with something like the Color Field module that lets users see a visual color in the admin interface but still output a CSS class in the markup.
How to use it Twig
{{ '#FFFFFF'|colorizer }} // color-white