Text color with the phone in night / dark mode

Hi everyone,
I have a problem with the colors of my app.
In my phone I use the dark mode.
When i change the color of the text to black in App Inventor, the color is automatically change to default, the same is with the backgroud color.
I made a video to explain better.
In my phone the black text is displayed in white, and the same with the white backgroud that is displayed in black.
How can i fix it? Can I force my application to run evrything in light mode or dark mode and fix the UI colors by software if i want?
Thanks for your help

This is the screenshot of my phone

This is the .aia file
Test.aia (1.0 KB)

1 Like

you need to set screen background color, AND the Label's Text color .

1 Like

Hello Ivan

I'm not sure but it sounds like Android is doing that? What you can do is set custom colours - so 99% Black and 99% White (human eye can't tell the difference).

1 Like

I tried to add this blocks but i see everything the black background yet

image

1 Like

I tried to customize the background color with #f9f9f9ff but my phone change it with black color

App Inventor color is a integer, not a Hex string. Hex color only be used at designet view.

Hello Ivan

How are you testing? I just set your Project file to Black Screen background and white Label text, shows as such on the Properties palette and is also fine in the Companion on my Android 10 phone.

Test_WhiteOnBlack.aia (2.3 KB)

blocks

It doesn't work in my phone, have you set dark/night mode in your phone?

image

This is the screen in mode 1

This is the screen in mode 2

It change the background color a little bit.

Like suggested from ChrisWard, i tried to customize the color a little bit different from black to test, I put the hex color code inside this box, it is wrong?

Yes, here a hex string needed in designer view.

Noooo - if you are using the phone's own function, you shouldn't do anything to the Apps!

Also the image color is overridden by dark mode, i loaded a white image for background and it change in black :man_facepalming:

This is app inventor

This is on my phone

So do not use the phone's function...... An image that is white on a white background is not a reasonable test. In memory, it's just pixels (bytes), there is nothing to discern between the background and the image.

I can't force users not to use dark mode...
I need a solution to force my app to use light mode or other solution that work for all users

I'm sorry Ivan but you have the "wrong end of the stick". The App developers cannot make an allowance for a specific feature supplied by the phone manufacturer, unless your app is only intended for one specific phone Make/model. Each manufacture has their own methods or just use verbatim Android (There are differences between Android versions). Samsung, Huawei etc all have their own functions for their high-end phones - plus they often update!

Had you made it clear that your App is distributed, I'd have given this advice earlier - I thought you were just working on your own phone.

How many Apps on your phone have a dark/light mode setting? My guess is zero.