I recently played Stack from Ketchapp Studios on my android phone. I really liked the concept. And then, I came up with a question. How would these guys make the transition in color of the cubes using some automated method, looping through color values?
Assume that they uses hex
or rgb()
values, how would they make that nice transition? What values would they update and with what steps? I have studied color theory in the past, but I'm not sure how to answer the above question.
Some images that shows this color change:
Update
After some discussion in the comments I would like to point out some few things. @Cai suggests it is possible to use predefined values for my colors. I'm a developer not a designer (not so much at least). I always want to use only as much space as I need in my variables. An array of predefined colors will use more resources than using a loop statement to change values.