Android Question Unable to set label colors

Discussion in 'Android Questions' started by FERNANDO SILVEIRA, Apr 6, 2018.

  1. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    Hi,

    I'm trying to create four labels, each one with a different color (Yellow, Green, Red & Blue).
    I hard coded these static colors on the Visual Designer but they keep appearing transparent on the WYSIWYG panel and when I run the program.

    My idea is also to change these colors during program execution later.

    What am I doing wrong?
    Which color property should I set?

    Regards,
    Fernando

    upload_2018-4-5_22-33-38.png
     
  2. Eme Fibonacci

    Eme Fibonacci Well-Known Member Licensed User

    Just set alpha level value to 255.
     
    FERNANDO SILVEIRA likes this.
  3. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    Got it.
    Thanx a lot.

    BTW, they could call it "transparency" or something, instead of "alpha level", don't you think?
     
  4. Didier9

    Didier9 Active Member Licensed User

    They could but alpha level is an industry standard term in computer graphics and they figure it will be easier for you to learn it than for the rest of the industry to change it :)
     
  5. Computersmith64

    Computersmith64 Well-Known Member Licensed User

    "Transparency" would actually be backwards - because an alpha of 0 = fully transparent & an alpha of 255 = fully opaque. It might make more sense to call is "Opacity", but most programmers are familiar with alpha (as in ARGB,or RGBA) for colors. :)

    - Colin.
     
    FERNANDO SILVEIRA likes this.
  6. Didier9

    Didier9 Active Member Licensed User

    Look at this Wikipedia article for some background:
    https://en.wikipedia.org/wiki/Alpha_compositing
     
    FERNANDO SILVEIRA likes this.
  7. Eme Fibonacci

    Eme Fibonacci Well-Known Member Licensed User

    Don't worry so much.
    @Erel always uses the names and patterns appropriately.
    If the answers are helpful to you, please mark it as "like."
     
    FERNANDO SILVEIRA likes this.
  8. asales

    asales Well-Known Member Licensed User

    Are you from Brazil? If yes, in Portuguese (Brazilian) language in IDE, it translate as "transparency level" or "Nível de transparência".
     
    FERNANDO SILVEIRA likes this.
  9. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    Sou, sim
    Obrigado
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice