[SOLVED] How can I make the score change color gradually?

Hi, I am making a video game and I have 2 scores, one is the main score where it says how many points the player has and the secondary score where it says how many points are left to pass the level, currently the secondary score where it says how many points are left is red, but I would like to make that as less points are left to pass the level the score turns green.
I look forward to your reply!!!

I can think of tree potential methods, and I’d personally look at using the 3rd one (HSV) as it has cleaner/nicer colours in the transition :

  1. Use a second secondary text - keep the primary one red, and the secondary one green. The red text is on top, and change it’s opacity depending on the score.
  2. Change the R & G components of the RGB. Whatever the R is set to, change the G to 255 - [value of R].
  3. Use HSV colours for the secondary score.(install the colour conversion extension to get the RGB to HSV and vice versa). You’ll then only need to change the H value of the text colour from 0 (red) to 120 (green) or somewhere in between.

From Paint.net :

imageimage

2 Likes

Wow, thanks it worked!!

1 Like