Why is my color with Alpha washed out in XOJO

  1. 2 years ago

    Arthur G

    19 Dec 2018 Testers, Xojo Pro
    Edited 2 years ago

    I have a textarea which presents a couple of colors with alpha and both are washed out.
    This is the code for the red background below
    CWrngColr = Color.RGBA(255, 000, 000, 208) or &cff0000d0
    A link to it also

    I also use a canvas with a png backdrop of the SAME color.
    This is the image of the png.
    A link to it also

    They are significantly different. Why?

  2. Jeff T

    19 Dec 2018 Midlands of England, Europe
    Edited 2 years ago

    Do you want solid red?
    If so, why use an alpha?

    CWrngColr = &CFF0000



  3. Julian S

    19 Dec 2018 Xojo Pro UK

    If you have a colour with transparency (208 in your case) the colour that was there before will have an effect on your red, in your case a white was in the background first so the red will be slightly mixed with white, thus making the pink you see. If you had the colour on a black background, the red would look darker.

  4. Arthur G

    19 Dec 2018 Testers, Xojo Pro

    Thanks. Julian. My confusion comes from the image below which has transparency in it. I like the translucent and will probably use that instead. I do not remember a setting for getting an image with translucent

  5. Arthur G

    19 Dec 2018 Testers, Xojo Pro

    Oh. I had the values for the alpha backwards.

or Sign Up to reply!