Transparency with 4th alpha-slider

Hi,
I am trying to create a coloured transparant button with 4 variables (sliders). Standard solution: set background color, make color, make list, 4 parameters RGB & Alpha). With this button I have to simulate the color of RGBW leds. With a white background behind the button and a variable transparency I can simulate the white part of the RGBW led. The 4th variable in the list is the alpha parameter. RGB sliders are working fine but the alpha slider 'fades' to black.

I have tried every possible background color combination ( screen, arrangement, component background - none, white) also uploaded a white background-image into the screen. The button keeps 'fading' to black and I need to 'fade' it to transparent white (white background)

Am I doing something wrong ?
Can someone help me and explain ?

Henk
Rotterdam

Try this project:
ColourTransparencySlider2.aia (2.8 KB)

The button is given a colour of none, and placed inside a vertical arrangement. You vary the colour of the arrangement not the button, but the effect is as required ?

Tested in companion and compiled (android 10 and 12)

A button behaves differently and goes from colour (255) to Black (0)
You could also:
Just use an arrangement instead, and use a component click extension like this:

Thanks,
TIMA12, works like a charm!

2 remarks (not to you, but to App Inventor)

  • I do not understand why this information (no transparency on a button) is not available. I took me 2 days to find out.
  • Can be made by AI on a button too I think (not too hard)

Sadly I am loosing my round corners (button) in the design

regards
Henk

There is an extension for that :wink: