Why is my color with Alpha washed out in XOJO

  1. 4 months ago

    Arthur G

    Dec 19 Pre-Release Testers
    Edited 4 months 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
    -image-
    A link to it also
    CWrngColr.png

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

    They are significantly different. Why?

  2. Jeff T

    Dec 19 Pre-Release Testers Midlands of England, Europe
    Edited 4 months ago

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

    CWrngColr = &CFF0000

    https://docs.xojo.com/images/2/21/TranslucentPatches.jpg

    -image-

  3. Julian S

    Dec 19 Pre-Release Testers, 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

    Dec 19 Pre-Release Testers

    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

    Dec 19 Pre-Release Testers

    Oh. I had the values for the alpha backwards.

or Sign Up to reply!