hex_ to_ rgbaDeprecated
string | hex_to_rgba
returns string
Converts a CSS color string from hexadecimal format to format. Shorthand hexadecimal formatting (
hex3
) is also accepted.
{{ '#EA5AB9' | hex_to_rgba }}
{{ '#EA5AB9' | hex_to_rgba }}
Output
rgba(234,90,185,1)
Anchor to alpha
alpha
string | hex_to_rgba: number
The default alpha
value is 1.0. However, you can specify a decimal value between 0.0 and 1.0.
{{ '#EA5AB9' | hex_to_rgba: 0.5 }}
{{ '#EA5AB9' | hex_to_rgba: 0.5 }}
Output
rgba(234,90,185,0.5)
Was this page helpful?