react-native/Libraries/ReactIOS
Christopher Chedeau c8a0a3eff6 Reimplement color processing
Summary:
**Problem:**

As I was trying to document what color formats we supported, I realized that our current implementation based on the open source project tinycolor supported some crazy things. A few examples that were all valid:

```
tinycolor('abc')
tinycolor(' #abc ')
tinycolor('##abc')
tinycolor('rgb 255 0 0')
tinycolor('RGBA(0, 1, 2)')
tinycolor('rgb (0, 1, 2)')
tinycolor('hsv(0, 1, 2)')
tinycolor({r: 10, g: 10, b: 10})
tinycolor('hsl(1%, 2, 3)')
tinycolor('rgb(1.0, 2.0, 3.0)')
tinycolor('rgb(1%, 2%, 3%)')
```

The integrations of tinycolor were also really bad. processColor added "support" for pure numbers and an array of colors!?? ColorPropTypes did some crazy trim().toString() and repeated a bad error message twice.

**Solution:**

While iteratively cleaning the file, I eventually ended up reimplementing it entierly. Major changes are:
- The API is now dead simple: returns null if it doesn't parse or returns the int32 representation of the color
- Stricter parsing of at
Closes https://github.com/facebook/react-native/pull/5529

Reviewed By: svcscm

Differential Revision: D2872015

Pulled By: nicklockwood

fb-gh-sync-id: df78244eefce6cf8e8ed2ea51f58d6b232de16f9
2016-01-29 09:13:32 -08:00
..
IOSDefaultEventPluginOrder.js flowify Libraries/ReactIOS 2015-03-25 17:09:51 -08:00
IOSNativeBridgeEventPlugin.js Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
NativeMethodsMixin.js Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
YellowBox.js RN: Teach YellowBox to Count 2016-01-20 15:14:31 -08:00
renderApplication.android.js RN: Revamp YellowBox for Warnings 2015-11-20 13:09:16 -08:00
renderApplication.ios.js Fix errors uncovered by v0.19.0 2015-12-01 20:11:26 -08:00
requireNativeComponent.js Reimplement color processing 2016-01-29 09:13:32 -08:00
verifyPropTypes.js More helpful description for native-js prop mismatch 2016-01-28 20:14:34 -08:00