react-native: [Android] borderColor is broken for transparent colors

Setting borderColor: "rgba(255, 255, 255, 0.5)" works but borderColor: "rgba(255, 255, 255, 0.6)" gives a black border.

Expected: screen shot 2015-10-24 at 10 39 16 am

Android: screen shot 2015-10-24 at 10 39 10 am

Sample app: https://rnplay.org/apps/l1bw2A

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 6
  • Comments: 22 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I’ll work on it. anyone who has already started, please let me know here.

Still happens on 0.27.2

Hi all, I have a pull request to fix this here: https://github.com/facebook/react-native/pull/9380

Problem had to do with storing int value as float. This is lossy when converting back to int for very large numbers. To solve this I split color (ARGB) into RGB and Alpha values to be stored separately.

screen shot 2016-08-12 at 5 49 42 pm

I have the same issue with 0.26 on ios as well.

Still happening on 0.26 on Android