Author Topic: Value for Color Set  (Read 2051 times)

It's just a text box where you can put in a specific value so you can get the right color you want.



that and the color menu for the Garage add-on need this



Well, it's totally possible by getting the closest color from the colorset. It will NOT be exact since RGBA has 1000^4 colors and colorsets have 64 colors.

Can't you divide 256 by 100 to get the right value then?

Like.. Get the colorset's RGBA for avatar colors?

Can't you divide 256 by 100 to get the right value then?
No, you'd need to change the colorset which isn't possible at runtime. You'd have to get the closest color from the colorset and paint that brick said color.

Well, it's totally possible by getting the closest color from the colorset. It will NOT be exact since RGBA has 1000^4 colors and colorsets have 64 colors.

... technically RGBA has unlimited colors, but usually you give each channel 256, so it's actually 2564.

No, you'd need to change the colorset which isn't possible at runtime. You'd have to get the closest color from the colorset and paint that brick said color.

$Pref::Server::AllowColorLoading

You can actually set bricks to any rgb color but if you want more than 64 colors at a time it will break as soon as you re-ghost them or someone else joins

... technically RGBA has unlimited colors, but usually you give each channel 256, so it's actually 2564.
Since the colorset colors are 0.000-1.000, you technically have 1000 colors to pick from.

Since the colorset colors are 0.000-1.000, you technically have 1000 colors to pick from.

They're converted to the integer range [0, 256) first. Even if you represent it with double precision floats you're not going to have millions of values per channel.
« Last Edit: April 08, 2015, 02:22:31 AM by portify »

Oh, I see. Don't you mean 0-255 though?

Oh, I see. Don't you mean 0-255 though?
The notation he used would convert to 0 <= x < 256 which is equivalent to (if you're using integers) 0 <= x <= 255