PlatformColor

The PlatformColor function is used to access native colors on the target platform by supplying the native color's corresponding string value. If you pass more than one string value, it will treat the first value as the default and the rest as a fallback.


RESETRUNFULL
import React from 'react';import { Platform, PlatformColor, StyleSheet, Text,
  View} from 'react-native';const App = () => (
  <View style={styles.container}>
    <Text style={styles.label}> I am a special label color!</Text>
  </View>);const styles = StyleSheet.create({
  label: {
    padding: 16,
    ...Platform.select({
      ios: {
        color: PlatformColor('label'),
        backgroundColor:
          PlatformColor('systemTealColor'),
      },
      android: {
        color: PlatformColor('?android:attr/textColor'),
        backgroundColor:
          PlatformColor('@android:color/holo_blue_bright'),
      },
      default: { color: 'black' }
    })
  },
  container: {flex: 1, alignItems: 'center', justifyContent: 'center'}});export default App;