How do I change layout background color smoothly ?

Get help using Construct 2

Post » Sat Jan 10, 2015 11:11 pm

I am looking for color transition like this :

http://css-tricks.com/almanac/properties/t/transition/

Is it posible to make this w/o installing new plugin ?

Thank you!
Image
B
58
S
25
G
39
Posts: 449
Reputation: 23,723

Post » Sat Jan 10, 2015 11:52 pm

You can use the set layer background color action and change the r,g,b values over time.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Sun Jan 11, 2015 12:33 pm

@ramones Thanks for the answer but how do I make the change smoothly, should I create 3 variable R G B and use lerp to change ?
Image
B
58
S
25
G
39
Posts: 449
Reputation: 23,723

Post » Sun Jan 11, 2015 12:40 pm

If only C2 had decent HSV() function that produces a usable color from Hue/Saturation/Value this would be a piece of cake, but for some reason these crucial functions almost never get implemented. For CC I ended up making my own plugin that does this.

For decent color transitions HSV (or HSL or HSB) is crucial - one way to achieve this is adding a HSL effect to your background layer and adjusting the values there (like lerping from one hue to another). Not sure about the performance hit, but it shouldn't be too bad.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Sun Jan 11, 2015 8:39 pm

@Somebody Thanks man.
Image
B
58
S
25
G
39
Posts: 449
Reputation: 23,723

Post » Tue May 12, 2015 11:48 pm

Hey there, I know it's been a long time since this post was last looked on but can you please post a Example CAPX of this? I would really love to see how this is handled and how it goes with my backgrounds.
Risk Rocket now available on Google Play
Image
B
35
S
15
G
6
Posts: 337
Reputation: 6,275

Post » Fri Jan 01, 2016 5:19 am

Sorry to bump this thread. Still looking for a solution.

How do I lerp the hue?

I have set R G B as variable and set a range for each to be generated randomly. How do I set the lerp for the transition to happen smoothly?
B
23
S
10
G
2
Posts: 104
Reputation: 3,071


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests