How to change the number string at the end of the "URL" to the variant color option

I am experiencing a challenge with my product page which has multiple variants. Whenever a customer selects a variant, the URL changes to incorporate a variant ID number.

For instance, the URL might change from

sblum_1-1680035621363.png

to

sblum_2-1680035679248.png

after a customer selects a color option.

To provide a better user experience for my customers(and SEO), I want to modify the variant URL so that the corresponding color name is displayed instead of the variant ID number. My preferred outcome is that when a customer selects a blue color option, the URL should reflect this choice by displaying

-50-per-pack?variant=blue” instead of a variant ID number.

Thanks.

2 Likes