You are here

public function TwigColor::getFilters in Twig Tools 8

File

src/TwigExtension/TwigColor.php, line 13

Class

TwigColor
Class TwigConvert.

Namespace

Drupal\twig_tools\TwigExtension

Code

public function getFilters() {
  return [
    new \Twig_SimpleFilter('rgb_to_hex', [
      $this,
      'rgbToHex',
    ]),
    new \Twig_SimpleFilter('css_rgb_to_hex', [
      $this,
      'cssRgbToHex',
    ]),
    new \Twig_SimpleFilter('hex_to_rgb', [
      $this,
      'hexToRgb',
    ]),
    new \Twig_SimpleFilter('hex_to_css_rgb', [
      $this,
      'hexToCssRgb',
    ]),
  ];
}