Button colors do not look as they would be

Hello guys,
In my application I need to show when a button is disabled or enabled and when is pressed. So, for each button I designed 3 images with 3 different button background colors and a icon (a car) centered on the button. I see correctly the cyan and lightcyan color buttons (the car is still white) but I see a black car in the grey png button and a darkgrey car in the grey jpg button. Why I am not able to see the correct color for the car if the button is grey?
Thanks, Massimo
btn-159-58-cyan-car-disabled
btn-159-58-cyan-car-disabled
btn-159-58-cyan-car-down
btn-159-58-cyan-car-up
TestBtnDisabledForGreyColor.aia (19.2 KB)

A screen shot of your app will help us to understand what you are doing.

My mistake, I forgot to add the zip archive containing the aia, the images and the screenshot.




I added the source and the images of the buttons in my original post and the screenshots in the 1st reply to you.

Works fine for me with companion app, white car in all four images

Obviously you used my aia... so what is different? My phone is an Android11 and has nothing strange I suppose. After your reply I tested also with AI2 Offline but nothing changed, the result is the car is black or dark gray if the button background is gray.

Do you have any strange theme settings on your phone, dark mode etc.

I checked your images, the white is white (not transparent).

Are you testing with companion or compiled ?

What is your device ?

Android9




The last one is a jpg image so there is no transparency. Your phone seems to automatically add transparency. Have you checked in the compiled apk

ye, last is a jpg just to test if it works differently but as you say nothing different.

Good suggestions, I see the problem in dark mode but it disappears in clear mode. Do you know a way to solve also if the phone is in dark mode? I am using a POCO M3 Pro 5G updated today (to see if solves the problem) to Android 13 and MIUI 14.0.1.0.
First check only with the companion and I saw the problem.
After your reply I checked also with apk and it works correctly.
Seems that the problem is limited when working with companion and the phone has dark mode active.

If it's just the companion, I wouldn't worry about it. Test logic in companion, test UI in apk. Companion uses your device's real theme, so if your device uses tricks to make an artificially dark theme, companion will pick it up. The apk even though we tick "device theme" doesn't really use device theme only android 5+ theme.