With this modifier, it's possible to convert an HTML color code into an RGB value in your email content. For example, you can use it to convert a value from a color picker property into an RGB value.
With this modifier, it's possible to convert an HTML color code into an RGB value in your email content. For example, you can use it to convert a value from a color picker property into an RGB value.
hex_to_rgb
{{$hex_colour|hex_to_rgb}}
hex_to_rgb examples
{{"#FFFFFF"|hex_to_rgb}}
{{"#000000"|hex_to_rgb}}
{{"#48D1CC"|hex_to_rgb}}
{{if $property['Colorpicker']}}
{{$property['Colorpicker']}}: {{$property['Colorpicker']|hex_to_rgb}}
{{/if}}
Output:
rgb(255,255,255)
rgb(0,0,0)
rgb(72,209,204)
#b52929: rgb(181,41,41)