You get a color as a hex string. The transparency is left out.
{{ 'rgb(122, 181, 92)' | color_to_hex }}
Output
#7ab55c