Search Unity

uss: how to enter alpha for color properties?

Discussion in 'UI Toolkit' started by Devi-User, Mar 14, 2019.

  1. Devi-User

    Devi-User

    Joined:
    Apr 30, 2016
    Posts:
    61
    I'm trying to write with the pattern #rrggbbaa, but it doesn't work - the log swears at me for such things. However, I can enter a color with alpha in the debugger window and in the code. I know about the 'opactity' property, but it affects the whole element.
     
  2. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    377
    Hi Devi-User,

    Try with this syntax:
    rgba(255, 255, 255, 0.5)

    Hope this helps
     
    Devi-User likes this.
  3. Devi-User

    Devi-User

    Joined:
    Apr 30, 2016
    Posts:
    61
    Thanks for the reply, it works