{%- capture rgb -%}{{ color | color_to_rgb }}{%- endcapture -%}
{%- assign tail = percentage | divided_by: 100.0 | prepend: ', ' | append: ')' -%}

{{ rgb | replace: 'rgb', 'rgba' | replace: ')', tail }}