Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: eliascanaza on November 06, 2014, 03:27:40 PM
Title:
change Color UILabel
Post by:
eliascanaza
on
November 06, 2014, 03:27:40 PM
Hi everyone.
I need to change Color of UILabel,
UILabel lbl
=
transform
.
GetComponent
<
UILabel
>
(
)
;
lbl
.
color
=
new
Color
(
210f,211f,204f,255f
)
;
but dosent work this form... the result is other: R: 12330, G: 41234 ... others values, i need this color ... i need help.
thanks
Title:
Re: change Color UILabel
Post by:
AGB
on
November 06, 2014, 03:35:38 PM
new Color should take floats from 0 to 1:
new Color(0.82f,0.83f,0.8f,1f);
or maybe like this:
new Color(210f/255f,211f/255f,204f/255f,255f/255f); :)
Title:
Re: change Color UILabel
Post by:
eliascanaza
on
November 07, 2014, 10:30:43 AM
thanks broo... this work!