Search Unity

Button color doesn't seem to be changed but its value does. Transition mode problem

Discussion in 'Editor & General Support' started by aesparza, Apr 21, 2016.

  1. aesparza

    aesparza

    Joined:
    Apr 4, 2016
    Posts:
    29
    Hi,

    I have a problem with the view of buttons color.

    The buttons transition is set to none. After that, their color's value is changed from script.
    The problem is that from the view, the buttons don't seem to have the color that the Inspector shows. But, if I change in the Inspector the transition mode to another one, and then I finally set to None, the color suddenly appears in the button view.

    Does it mean that I have to change the transition mode after change the color of the buttons to see it correctly ? How can I solve this problem?

    Thanks!
     

    Attached Files:

    • 2.png
      2.png
      File size:
      90.1 KB
      Views:
      700
    • 1.png
      1.png
      File size:
      92.4 KB
      Views:
      682
  2. Guilherme-Otranto

    Guilherme-Otranto

    Joined:
    Mar 12, 2014
    Posts:
    28
    Heyya!

    It's the alpha!
    The button seems lighter on your scene view because the white from the background is 'bleeding' to the top. This happens because you set the color to have an alpha value (as evidenced by the little white line that does not go to the end on the inspector color display).
    Change that and you're golden.
    Or, rather, you're dark blue, I suppose...
     
  3. aesparza

    aesparza

    Joined:
    Apr 4, 2016
    Posts:
    29
    Thanks for your answer! I finally changed the alpha value before I set the transition mode.