Button image sprite colour change

Hello world,

I have a small problem: I want a button the light up in a certain colour for a while after I press it.
Since I use a custom sprite as the image of the button, influencing the button image colour directly causes it to turn invisible for some reason (rbga isn’t setting it to transparent). It actually turns back to its original colour after the coroutine is executed, it’s just teh change that isn’t working properly.

Here’s the script I’m using and how it looks like:
[Script] (Screenshot - 2ed17e0d5419f183d4b777b2ea0cc069 - Gyazo)
[Gif] (Screen capture - d181d0655a365d922f00acece50fc092 - Gyazo)

As the Image component doesn’t work, I wanted to use image.sprite; but since there’s no SpriteRenderer on the button, I’m unsure on how to set its colour.

Any help is appreciated. :slight_smile:

You can use image.color.

 button.image.color = Color.red;