Skip to content

Text color is overridden to white in dark mode #31052

Closed as not planned
Closed as not planned
@serd

Description

@serd

Description

In the following React Native (0.63.3) app, text color is black on the emulator as expected, but overridden to white when tested on a device with Android 10 in dark mode.

(It also overrides #333, #345 or similar dark shades to lighter colors. Border colors and more are overridden too but let's keep it simple.)

React Native version:

0.63.3

Steps To Reproduce

  1. Run on a device with Android 10 (Xiaomi Redmi Note 9 in my test) in dark mode.

Expected Results

Text should be black but overridden to white. On the emulator it is indeed black as expected, but on the device, text is white.

Snack, code example, screenshot, or link to a repository:

https://snack.expo.io/RnyESv4pS

import React from 'react';
import {View, Text} from 'react-native';

const App = () => {

  return (
    <View style={{flex: 1, backgroundColor: "#ccc"}}>
      <Text style={{color: "#000"}}>Test</Text>
    </View>
  );
  
};

export default App;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions