Author Topic: Change Color Tint of UILabel?  (Read 16872 times)

Dedede

  • Guest
Change Color Tint of UILabel?
« on: May 18, 2012, 02:33:27 PM »
Hey guys,

is it possible to change the color tint value of an UILabel at runtime?

I can only find effectColor, which as the name implies only works, if effects are used.

Thanks.

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: Change Color Tint of UILabel?
« Reply #1 on: May 18, 2012, 03:11:30 PM »

Dedede

  • Guest
Re: Change Color Tint of UILabel?
« Reply #2 on: May 18, 2012, 03:33:14 PM »
Thanks Ferazel,
it works like a charm :)

tinyutopia

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 15
    • View Profile
Re: Change Color Tint of UILabel?
« Reply #3 on: April 17, 2013, 03:06:48 PM »
This is a dead link

Lohoris

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Change Color Tint of UILabel?
« Reply #4 on: September 17, 2013, 04:31:06 AM »
This is a dead link
Dead link indeed.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Change Color Tint of UILabel?
« Reply #5 on: September 17, 2013, 02:55:20 PM »
  1. UILabel lbl = GetComponent<UILabel>();
  2. lbl.color = Color.red;

skatola

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 31
    • View Profile
Re: Change Color Tint of UILabel?
« Reply #6 on: January 31, 2016, 06:35:20 AM »
  1. UILabel lbl = GetComponent<UILabel>();
  2. lbl.color = Color.red;

sorry, what if i want change just a part of a uilabel?
for example: uilabel_text = "Hello World[/color=#2b2b2b]";

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Change Color Tint of UILabel?
« Reply #7 on: January 31, 2016, 08:37:33 AM »
  1. label.text = "Hello [ff0000]red[-] world";
It's explained in the documentation for UILabel, even shown in the picture. http://www.tasharen.com/forum/index.php?topic=6706.0