NativeScript / theme

@nativescript/theme
https://v7.docs.nativescript.org/ui/theme
Apache License 2.0
128 stars 44 forks source link

Dark Mode background color always darken then defined #287

Closed sivo1981 closed 3 years ago

sivo1981 commented 3 years ago

Environment √ Getting NativeScript components versions information... √ Component nativescript has 7.0.12 version and is up to date. √ Component @nativescript/core has 7.0.13 version and is up to date. √ Component @nativescript/ios has 7.0.6 version and is up to date. √ Component @nativescript/android has 7.0.1 version and is up to date.

Describe the bug How to disable automatic darking of defined background colors in dark mode.

Light mode (OK): <Button text="BUTTON" backgroundColor="yellow" />

image

Dark mode (defined color is always darken): <Button text="BUTTON" backgroundColor="yellow" />

image

This issue appears only on Android.

Is there a way to override this?

sivo1981 commented 3 years ago

Setting <item name="android:forceDarkAllowed">false</item> in App_Resources\Android\src\main\res\values-v29\styles.xml resolves this issue.

Whip commented 3 years ago

@sivo1981 The colors are indeed accurate after this change. Any unintended consequence of this?