Color Lerp

Get help using Construct 2

Post » Thu May 16, 2013 1:41 pm

Hi !

I'm trying to "lerp" a sprite color during time. I tried first with Tint/ Set color etc, but I can't get at start the color I want.

For example, I want to start with R:G:B 104:133:27. But applying an effect on a blank sprite give me a totaly different color even if I put 104:133:27 in the effect parameters.

So I'm stuck at the start, It's my first time using effects and I'm a bit lost.

I'm looking for a color transition based on a duration :
1 -> 104:133:27
2 -> 182:17:70 (5sec after)
3 -> 209:184:91(5sec after)

Is it possible ? Should I use an enormous sprite with the color transition ?

Thanks !
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Thu May 16, 2013 1:58 pm

The color parameters for Tint are from 0-100 instead of 0-255.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu May 16, 2013 2:26 pm

Ty AShley, it's a good start ... :) You should put TSV and not RGB.

Or not, can't get the good color with tint or set color, gonna try another way.Joskin2013-05-16 15:02:55
B
39
S
15
G
5
Posts: 295
Reputation: 6,089


Return to How do I....?

Who is online

Users browsing this forum: abdalghani, imothep85, LeFuji, makkancs, Marxally, Virpoja and 21 guests