using |colorizer twig filter
colorizer string replace in html
Admin form for setting color mappings

This project is not covered by Drupal’s security advisory policy.

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
Supporting organizations: 

Project information

Releases