Skip to content

Text label backgroundColor has alpha display error #19260

@helele90

Description

@helele90

code

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

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
      <Text style={[styles.text, {backgroundColor: '#f30301'}]}>backgroundColor: #f30301</Text>
      <Text style={[styles.text, {backgroundColor: '#f3030150'}]}>backgroundColor: #f3030150</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    justifyContent: 'center',
    alignItems: 'center',
    flex: 1,
  },
  text: {
    marginTop: 10,
    height: 40,
    width: 200,
    fontSize: 13,
    textAlign: 'center',
    color: 'white',
  },
});

Image

9d8b85aea74007e56e808264fca008f7

Template

template: https://snack.expo.io/H1DvLbYRz

if Text style backgroundColor has alpha, the background display error.

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.11.1
Yarn: 1.6.0
npm: 6.0.1
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.2 => 16.3.2
react-native: ^0.55.4 => 0.55.4

Steps to Reproduce

Expected Behavior

Actual Behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.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