How to change RGB color in Text

Hey,

I want to change a color of my text. In the script I 'm doing this:

public Text text;

text.color = new Color( 50.0f, 50.0f, 50.0f);

It should be black but in the game it’s white. In the editor this text has got strange RGB value:
R = 12750
G = 12750
B = 12750

It doesn’t work also with other RGB values. Do you know why?

Thanks.

RGB values go from 0 to 1, not 0 to 255.

Hey,
As blizzy was saying the Color class uses values between 0 -1. If you want to use 0 - 256 you can use Color32 class.

Cheers,

Thanks,
Cheers