[SOLVED] Finding the right color for pc.Color

How can i find the color that i need? I can’t find a converter for this.
I already have some colors but i need it more specific.

var colorWhite = new pc.Color(1,1,1,0.5);
var colorBlack = new pc.Color(0,0,0,0.5);
var colorGrey = new pc.Color(0.5,0.5,0.5, 0.5);
var colorGreen = new pc.Color(0.5,0.8,0,0.5);
var colorYellow = new pc.Color(1,0.9,0,0.5);
var colorRed = new pc.Color(1,0.1,0,0.5);

In graphics software, color usually expressed in integer 0…255, in graphics it is usually 0…1.
Channels are RGB - Red Green Blue.
So if you have lets say orange color 255,128,0, then simply divide each value by 255 and you will have your 0…1 values.

4 Likes

Thank you @moka!