Welcome,
Guest
. Please
login
or
register
.
May 01, 2026, 08:41:48 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
change Color UILabel
« previous
next »
Print
Pages: [
1
]
Author
Topic: change Color UILabel (Read 4962 times)
eliascanaza
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 25
change Color UILabel
«
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
Logged
AGB
Jr. Member
Thank You
-Given: 0
-Receive: 1
Posts: 74
Re: change Color UILabel
«
Reply #1 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);
Logged
I'm a busy man... I have places to go,monsters to kill...
eliascanaza
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 25
Re: change Color UILabel
«
Reply #2 on:
November 07, 2014, 10:30:43 AM »
thanks broo... this work!
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
change Color UILabel