Colour Set

Get help using Construct 2

Post » Mon Dec 03, 2012 2:09 am

So I was just playing around with the ColorSet effect, and was trying some random values, but when I compare the numbers to the pallet of colours the numbers seem a bit off.

The Red, Green, Blue values are fine, but it's when you use the Random number generator, things go screwy. I've used int(random(255)) to generate the values, and have attached a .capx as well. It's not super urgent, but it just seems strange for it to return the colour it is.
Using R243 for all examples
B
66
S
20
G
6
Posts: 370
Reputation: 9,606

Post » Mon Dec 03, 2012 2:14 am

I don't quite get what you don't understand. Everything seems fine to me.
B
44
S
13
G
7
Posts: 603
Reputation: 7,936

Post » Mon Dec 03, 2012 12:47 pm

Well, when I compared RGB values it spat out, with the RGB values in Photoshop, Paint, and a few other imagining programs, the colors seemed quite off.

But if others are saying it's right, maybe I need to look into changing the settings in Chrome/Firefox then.
Using R243 for all examples
B
66
S
20
G
6
Posts: 370
Reputation: 9,606

Post » Mon Dec 03, 2012 2:07 pm

I haven't actually compared them to anything else but I'll do that soon.
B
44
S
13
G
7
Posts: 603
Reputation: 7,936

Post » Mon Dec 03, 2012 4:57 pm

The parameters for SetColor should be between 0 and 100, not 255. setColor.capx (r111)
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,285

Post » Mon Dec 03, 2012 6:36 pm

I'd actually question @Ashley 's judgement regarding these parameters. I understand it's more 'beginner-friendly' this way, but experienced programmers and even amateur graphics users can be thrown off by something that's not 0-255.sqiddster2012-12-03 18:36:50
B
92
S
30
G
24
Posts: 3,191
Reputation: 32,574

Post » Tue Dec 04, 2012 8:26 am

@Ramones : I see, well that would definately explain it.

@Sqiddster : I might ask Ashley about why it's designed that way.
Using R243 for all examples
B
66
S
20
G
6
Posts: 370
Reputation: 9,606

Post » Tue Dec 04, 2012 1:57 pm

Setting a value between 0 and 255 definitely makes more sense than setting it as a percentage. Converting the value to % is easy in code like in my capx but when you're setting a value in the editor eg.
Turquoise      
64, 224, 208
is
25.0980392157, 87.8431372549, 81.568627451
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,285


Return to How do I....?

Who is online

Users browsing this forum: SEBASTIANSSS and 3 guests