How can I change buy buttons's color for each variant color?

Topic summary

A user working with the Dawn theme wants to dynamically match the “Buy” button color to the selected product variant color. For example, selecting a red variant would turn the buy button red, while selecting yellow would make it yellow.

The user provided two images showing:

  • Their desired outcome (variant color matching button color)
  • The current state of their product page

Another participant confirmed this customization is achievable using custom code, noting it requires specialized development work. The discussion remains open with no specific implementation details provided yet.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

hi folks. I’m using Dawn theme.

I want the product variant color and the Buy button to be the same color when picked.
For example, if the variant color is red, I want the buy button to be red, and if it’s yellow, I want it to turn yellow.
This is what the page looks like now.

And this is example that I want.

Hi

It can be done with special work.!

Terence.