react-native/Libraries
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
..
ART Fixed ART background color 2016-01-08 15:42:32 -08:00
ActionSheetIOS ActionSheetIOS support for presentation from modal view controller 2016-01-12 03:14:35 -08:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Reimplement color processing 2016-01-29 09:13:32 -08:00
AppRegistry Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
AppState Android AppState 2016-01-21 11:47:21 -08:00
AppStateIOS Made Map & Set polyfills available globally 2016-01-20 08:27:38 -08:00
BatchedBridge Implement Android's dispatchViewManagerCommand interface on iOS 2016-01-06 05:58:37 -08:00
CameraRoll Make CameraRoll work with Promises 2016-01-21 08:07:41 -08:00
Components Add MapView annotation callback when it gets / lost the focus 2016-01-29 06:26:30 -08:00
CustomComponents Add a deprecatedPropType module to show deprecation warnings 2016-01-29 02:05:38 -08:00
DebugComponentHierarchy Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Device Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Devtools Use pre-bundled elements inspector 2015-10-29 11:21:32 -07:00
Fetch Add fetch's clone function to Request and Response prototypes 2015-10-30 10:57:33 -07:00
Geolocation See issue #4886 2016-01-12 03:11:31 -08:00
Image Fix CPU spike: should use UIGraphicsEndImageContext rather than UIGraphicsGetCurrentContext 2016-01-28 14:25:35 -08:00
Inspector Fix warnings generated by Elements Inspector 2016-01-25 18:43:47 -08:00
Interaction Updates for haste2 inside of jest 2016-01-08 06:52:29 -08:00
JavaScriptAppEngine Disable Flow on Packager 2016-01-27 15:33:31 -08:00
LayoutAnimation Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
Linking Add cross-platform Linking module 2016-01-26 14:34:31 -08:00
LinkingIOS Add cross-platform Linking module 2016-01-26 14:34:31 -08:00
Modal Improve Modal docs describing iOS only support 2015-12-05 18:48:28 -08:00
NativeApp Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Network bind this in onreadystatechange call 2016-01-18 08:55:35 -08:00
Picker Added support for styling the PickerIOS 2015-12-08 07:48:26 -08:00
Portal Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
PullToRefresh Added ColorPropType 2015-12-23 10:08:38 -08:00
PushNotificationIOS Made Map & Set polyfills available globally 2016-01-20 08:27:38 -08:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest Standardize Error objects for Promises 2016-01-19 12:20:37 -08:00
RKBackendNode Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
ReactIOS Reimplement color processing 2016-01-29 09:13:32 -08:00
ReactNative Deploy v0.20.1 2015-12-18 17:04:29 -08:00
Sample Remove invariant of Sample.ios.js that is not used 2015-05-26 18:25:00 -07:00
Settings Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
Storage Batch AsyncStorage.multiGet calls 2015-12-03 09:10:29 -08:00
StyleSheet Reimplement color processing 2016-01-29 09:13:32 -08:00
Text Added support for auto-resizing text fields 2016-01-25 05:46:29 -08:00
Utilities Add a deprecatedPropType module to show deprecation warnings 2016-01-29 02:05:38 -08:00
Vibration Text highlighting on iOS 2015-07-24 08:41:58 -08:00
WebSocket Added an optional options parameter for WebSockets 2016-01-20 11:01:39 -08:00
react-native Add a cross-platform Picker 2016-01-29 03:59:54 -08:00
vendor Reimplement color processing 2016-01-29 09:13:32 -08:00
Promise.js Add support for promise rejection tracking 2016-01-07 12:02:56 -08:00