mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b3d02a4d5f
Deploy website version based on 33aedc3b03df7f984bd330389c73cf66e151b250
212 lines
33 KiB
HTML
212 lines
33 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Color Reference · React Native</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Components in React Native are [styled using JavaScript](/react-native/docs/style). Color properties usually match how [CSS works on the web](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value)."/><meta name="docsearch:version" content="0.56"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Color Reference · React Native"/><meta property="og:type" content="website"/><meta property="og:url" content="https://facebook.github.io/react-native/index.html"/><meta property="og:description" content="Components in React Native are [styled using JavaScript](/react-native/docs/style). Color properties usually match how [CSS works on the web](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value)."/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/react-native/img/favicon.png"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://facebook.github.io/react-native/blog/atom.xml" title="React Native Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://facebook.github.io/react-native/blog/feed.xml" title="React Native Blog RSS Feed"/><script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||
|
||
ga('create', 'UA-41298772-2', 'auto');
|
||
ga('send', 'pageview');
|
||
</script><script type="text/javascript" src="https://snack.expo.io/embed.js"></script><script type="text/javascript" src="/react-native/js/codeblocks.js"></script><link rel="stylesheet" href="/react-native/css/main.css"/></head><body class="sideNavVisible"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/react-native/"><img class="logo" src="/react-native/img/header_logo.png" alt="React Native"/><h2 class="headerTitleWithLogo">React Native</h2></a><a href="/react-native/versions"><h3>0.56</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/react-native/docs/getting-started" target="_self">Docs</a></li><li class=""><a href="/react-native/en/help" target="_self">Community</a></li><li class=""><a href="/react-native/blog" target="_self">Blog</a></li><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li><li class=""><a href="https://github.com/facebook/react-native" target="_self">GitHub</a></li><li class=""><a href="https://reactjs.org/" target="_self">React</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i>›</i><span>Guides</span></h2></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">The Basics</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/getting-started">Getting Started</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/tutorial">Learn the Basics</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/props">Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/state">State</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/style">Style</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/height-and-width">Height and Width</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/flexbox">Layout with Flexbox</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/handling-text-input">Handling Text Input</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/handling-touches">Handling Touches</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/using-a-scrollview">Using a ScrollView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/using-a-listview">Using List Views</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/network">Networking</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/more-resources">More Resources</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Guides</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/components-and-apis">Components and APIs</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/platform-specific-code">Platform Specific Code</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/navigation">Navigating Between Screens</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/images">Images</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/animations">Animations</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/accessibility">Accessibility</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/improvingux">Improving User Experience</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/timers">Timers</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/debugging">Debugging</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/performance">Performance</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/gesture-responder-system">Gesture Responder System</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/javascript-environment">JavaScript Environment</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/direct-manipulation">Direct Manipulation</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/react-native/docs/colors">Color Reference</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/integration-with-existing-apps">Integration with Existing Apps</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/building-for-apple-tv">Building For TV Devices</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/running-on-device">Running On Device</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/upgrading">Upgrading to new React Native versions</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/troubleshooting">Troubleshooting</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/native-modules-setup">Native Modules Setup</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Guides (iOS)</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/native-modules-ios">Native Modules</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/native-components-ios">Native UI Components</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/linking-libraries-ios">Linking Libraries</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/running-on-simulator-ios">Running On Simulator</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/communication-ios">Communication between native and React Native</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/app-extensions">App Extensions</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Guides (Android)</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/native-modules-android">Native Modules</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/native-components-android">Native UI Components</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/headless-js-android">Headless JS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/signed-apk-android">Generating Signed APK</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/removing-default-permissions">Removing Default Permissions</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Contributing</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/contributing">How to Contribute</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/maintainers">What to Expect from Maintainers</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/building-from-source">Building React Native from source</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/testing">Testing your Changes</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/understanding-cli">Understanding the CLI</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Components</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/activityindicator">ActivityIndicator</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/button">Button</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/datepickerios">DatePickerIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/drawerlayoutandroid">DrawerLayoutAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/flatlist">FlatList</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/image">Image</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/inputaccessoryview">InputAccessoryView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/keyboardavoidingview">KeyboardAvoidingView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/listview">ListView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/maskedviewios">MaskedViewIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/modal">Modal</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/navigatorios">NavigatorIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/picker">Picker</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/pickerios">PickerIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/progressbarandroid">ProgressBarAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/progressviewios">ProgressViewIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/refreshcontrol">RefreshControl</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/safeareaview">SafeAreaView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/scrollview">ScrollView</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/sectionlist">SectionList</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/segmentedcontrolios">SegmentedControlIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/slider">Slider</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/snapshotviewios">SnapshotViewIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/statusbar">StatusBar</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/switch">Switch</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/tabbarios">TabBarIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/tabbarios-item">TabBarIOS.Item</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/text">Text</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/textinput">TextInput</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/toolbarandroid">ToolbarAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/touchablehighlight">TouchableHighlight</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/touchablenativefeedback">TouchableNativeFeedback</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/touchableopacity">TouchableOpacity</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/touchablewithoutfeedback">TouchableWithoutFeedback</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/view">View</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/viewpagerandroid">ViewPagerAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/virtualizedlist">VirtualizedList</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/webview">WebView</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">APIs</h3><ul><li class="navListItem"><a class="navItem" href="/react-native/docs/accessibilityinfo">AccessibilityInfo</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/actionsheetios">ActionSheetIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/alert">Alert</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/alertios">AlertIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/animated">Animated</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/appregistry">AppRegistry</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/appstate">AppState</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/asyncstorage">AsyncStorage</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/backandroid">BackAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/backhandler">BackHandler</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/cameraroll">CameraRoll</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/clipboard">Clipboard</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/datepickerandroid">DatePickerAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/dimensions">Dimensions</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/easing">Easing</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/geolocation">Geolocation</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/imageeditor">ImageEditor</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/imagepickerios">ImagePickerIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/imagestore">ImageStore</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/image-style-props">Image Style Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/interactionmanager">InteractionManager</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/keyboard">Keyboard</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/layout-props">Layout Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/layoutanimation">LayoutAnimation</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/linking">Linking</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/listviewdatasource">ListViewDataSource</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/netinfo">NetInfo</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/panresponder">PanResponder</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/permissionsandroid">PermissionsAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/pixelratio">PixelRatio</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/pushnotificationios">PushNotificationIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/settings">Settings</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/shadow-props">Shadow Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/share">Share</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/statusbarios">StatusBarIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/stylesheet">StyleSheet</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/systrace">Systrace</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/text-style-props">Text Style Props</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/timepickerandroid">TimePickerAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/toastandroid">ToastAndroid</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/transforms">Transforms</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/vibration">Vibration</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/vibrationios">VibrationIOS</a></li><li class="navListItem"><a class="navItem" href="/react-native/docs/view-style-props">View Style Props</a></li></ul></div></div></section></div><script>
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
|
||
createToggler('#tocToggler', 'body', 'tocActive');
|
||
|
||
const headings = document.querySelector('.toc-headings');
|
||
headings && headings.addEventListener('click', function(event) {
|
||
if (event.target.tagName === 'A') {
|
||
document.body.classList.remove('tocActive');
|
||
}
|
||
}, false);
|
||
|
||
function createToggler(togglerSelector, targetSelector, className) {
|
||
var toggler = document.querySelector(togglerSelector);
|
||
var target = document.querySelector(targetSelector);
|
||
|
||
toggler.onclick = function(event) {
|
||
event.preventDefault();
|
||
|
||
target.classList.toggle(className);
|
||
};
|
||
}
|
||
});
|
||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebook/react-native-website/blob/master/docs/colors.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Color Reference</h1></header><article><div><span><p>Components in React Native are <a href="/react-native/docs/style">styled using JavaScript</a>. Color properties usually match how <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS works on the web</a>.</p>
|
||
<h3><a class="anchor" aria-hidden="true" id="red-green-blue"></a><a href="#red-green-blue" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Red-green-blue</h3>
|
||
<p>React Native supports <code>rgb()</code> and <code>rgba()</code> in both hexadecimal and functional notation:</p>
|
||
<ul>
|
||
<li><p><code>'#f0f'</code> (#rgb)</p></li>
|
||
<li><p><code>'#ff00ff'</code> (#rrggbb)</p></li>
|
||
<li><p><code>'rgb(255, 0, 255)'</code></p></li>
|
||
<li><p><code>'rgba(255, 255, 255, 1.0)'</code></p></li>
|
||
<li><p><code>'#f0ff'</code> (#rgba)</p></li>
|
||
<li><p><code>'#ff00ff00'</code> (#rrggbbaa)</p></li>
|
||
</ul>
|
||
<h3><a class="anchor" aria-hidden="true" id="hue-saturation-lightness"></a><a href="#hue-saturation-lightness" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Hue-saturation-lightness</h3>
|
||
<p><code>hsl()</code> and <code>hsla()</code> is supported in functional notation:</p>
|
||
<ul>
|
||
<li><code>'hsl(360, 100%, 100%)'</code></li>
|
||
<li><code>'hsla(360, 100%, 100%, 1.0)'</code></li>
|
||
</ul>
|
||
<h3><a class="anchor" aria-hidden="true" id="transparent"></a><a href="#transparent" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>transparent</code></h3>
|
||
<p>This is a shortcut for <code>rgba(0,0,0,0)</code>:</p>
|
||
<ul>
|
||
<li><code>'transparent'</code></li>
|
||
</ul>
|
||
<h3><a class="anchor" aria-hidden="true" id="named-colors"></a><a href="#named-colors" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Named colors</h3>
|
||
<p>You can also use color names as values. React Native follows the <a href="http://www.w3.org/TR/css3-color/#svg-color">CSS3 specification</a>:</p>
|
||
<ul>
|
||
<li><color aliceblue /> aliceblue (#f0f8ff)</li>
|
||
<li><color antiquewhite /> antiquewhite (#faebd7)</li>
|
||
<li><color aqua /> aqua (#00ffff)</li>
|
||
<li><color aquamarine /> aquamarine (#7fffd4)</li>
|
||
<li><color azure /> azure (#f0ffff)</li>
|
||
<li><color beige /> beige (#f5f5dc)</li>
|
||
<li><color bisque /> bisque (#ffe4c4)</li>
|
||
<li><color black /> black (#000000)</li>
|
||
<li><color blanchedalmond /> blanchedalmond (#ffebcd)</li>
|
||
<li><color blue /> blue (#0000ff)</li>
|
||
<li><color blueviolet /> blueviolet (#8a2be2)</li>
|
||
<li><color brown /> brown (#a52a2a)</li>
|
||
<li><color burlywood /> burlywood (#deb887)</li>
|
||
<li><color cadetblue /> cadetblue (#5f9ea0)</li>
|
||
<li><color chartreuse /> chartreuse (#7fff00)</li>
|
||
<li><color chocolate /> chocolate (#d2691e)</li>
|
||
<li><color coral /> coral (#ff7f50)</li>
|
||
<li><color cornflowerblue /> cornflowerblue (#6495ed)</li>
|
||
<li><color cornsilk /> cornsilk (#fff8dc)</li>
|
||
<li><color crimson /> crimson (#dc143c)</li>
|
||
<li><color cyan /> cyan (#00ffff)</li>
|
||
<li><color darkblue /> darkblue (#00008b)</li>
|
||
<li><color darkcyan /> darkcyan (#008b8b)</li>
|
||
<li><color darkgoldenrod /> darkgoldenrod (#b8860b)</li>
|
||
<li><color darkgray /> darkgray (#a9a9a9)</li>
|
||
<li><color darkgreen /> darkgreen (#006400)</li>
|
||
<li><color darkgrey /> darkgrey (#a9a9a9)</li>
|
||
<li><color darkkhaki /> darkkhaki (#bdb76b)</li>
|
||
<li><color darkmagenta /> darkmagenta (#8b008b)</li>
|
||
<li><color darkolivegreen /> darkolivegreen (#556b2f)</li>
|
||
<li><color darkorange /> darkorange (#ff8c00)</li>
|
||
<li><color darkorchid /> darkorchid (#9932cc)</li>
|
||
<li><color darkred /> darkred (#8b0000)</li>
|
||
<li><color darksalmon /> darksalmon (#e9967a)</li>
|
||
<li><color darkseagreen /> darkseagreen (#8fbc8f)</li>
|
||
<li><color darkslateblue /> darkslateblue (#483d8b)</li>
|
||
<li><color darkslategrey /> darkslategrey (#2f4f4f)</li>
|
||
<li><color darkturquoise /> darkturquoise (#00ced1)</li>
|
||
<li><color darkviolet /> darkviolet (#9400d3)</li>
|
||
<li><color deeppink /> deeppink (#ff1493)</li>
|
||
<li><color deepskyblue /> deepskyblue (#00bfff)</li>
|
||
<li><color dimgray /> dimgray (#696969)</li>
|
||
<li><color dimgrey /> dimgrey (#696969)</li>
|
||
<li><color dodgerblue /> dodgerblue (#1e90ff)</li>
|
||
<li><color firebrick /> firebrick (#b22222)</li>
|
||
<li><color floralwhite /> floralwhite (#fffaf0)</li>
|
||
<li><color forestgreen /> forestgreen (#228b22)</li>
|
||
<li><color fuchsia /> fuchsia (#ff00ff)</li>
|
||
<li><color gainsboro /> gainsboro (#dcdcdc)</li>
|
||
<li><color ghostwhite /> ghostwhite (#f8f8ff)</li>
|
||
<li><color gold /> gold (#ffd700)</li>
|
||
<li><color goldenrod /> goldenrod (#daa520)</li>
|
||
<li><color gray /> gray (#808080)</li>
|
||
<li><color green /> green (#008000)</li>
|
||
<li><color greenyellow /> greenyellow (#adff2f)</li>
|
||
<li><color grey /> grey (#808080)</li>
|
||
<li><color honeydew /> honeydew (#f0fff0)</li>
|
||
<li><color hotpink /> hotpink (#ff69b4)</li>
|
||
<li><color indianred /> indianred (#cd5c5c)</li>
|
||
<li><color indigo /> indigo (#4b0082)</li>
|
||
<li><color ivory /> ivory (#fffff0)</li>
|
||
<li><color khaki /> khaki (#f0e68c)</li>
|
||
<li><color lavender /> lavender (#e6e6fa)</li>
|
||
<li><color lavenderblush /> lavenderblush (#fff0f5)</li>
|
||
<li><color lawngreen /> lawngreen (#7cfc00)</li>
|
||
<li><color lemonchiffon /> lemonchiffon (#fffacd)</li>
|
||
<li><color lightblue /> lightblue (#add8e6)</li>
|
||
<li><color lightcoral /> lightcoral (#f08080)</li>
|
||
<li><color lightcyan /> lightcyan (#e0ffff)</li>
|
||
<li><color lightgoldenrodyellow /> lightgoldenrodyellow (#fafad2)</li>
|
||
<li><color lightgray /> lightgray (#d3d3d3)</li>
|
||
<li><color lightgreen /> lightgreen (#90ee90)</li>
|
||
<li><color lightgrey /> lightgrey (#d3d3d3)</li>
|
||
<li><color lightpink /> lightpink (#ffb6c1)</li>
|
||
<li><color lightsalmon /> lightsalmon (#ffa07a)</li>
|
||
<li><color lightseagreen /> lightseagreen (#20b2aa)</li>
|
||
<li><color lightskyblue /> lightskyblue (#87cefa)</li>
|
||
<li><color lightslategrey /> lightslategrey (#778899)</li>
|
||
<li><color lightsteelblue /> lightsteelblue (#b0c4de)</li>
|
||
<li><color lightyellow /> lightyellow (#ffffe0)</li>
|
||
<li><color lime /> lime (#00ff00)</li>
|
||
<li><color limegreen /> limegreen (#32cd32)</li>
|
||
<li><color linen /> linen (#faf0e6)</li>
|
||
<li><color magenta /> magenta (#ff00ff)</li>
|
||
<li><color maroon /> maroon (#800000)</li>
|
||
<li><color mediumaquamarine /> mediumaquamarine (#66cdaa)</li>
|
||
<li><color mediumblue /> mediumblue (#0000cd)</li>
|
||
<li><color mediumorchid /> mediumorchid (#ba55d3)</li>
|
||
<li><color mediumpurple /> mediumpurple (#9370db)</li>
|
||
<li><color mediumseagreen /> mediumseagreen (#3cb371)</li>
|
||
<li><color mediumslateblue /> mediumslateblue (#7b68ee)</li>
|
||
<li><color mediumspringgreen /> mediumspringgreen (#00fa9a)</li>
|
||
<li><color mediumturquoise /> mediumturquoise (#48d1cc)</li>
|
||
<li><color mediumvioletred /> mediumvioletred (#c71585)</li>
|
||
<li><color midnightblue /> midnightblue (#191970)</li>
|
||
<li><color mintcream /> mintcream (#f5fffa)</li>
|
||
<li><color mistyrose /> mistyrose (#ffe4e1)</li>
|
||
<li><color moccasin /> moccasin (#ffe4b5)</li>
|
||
<li><color navajowhite /> navajowhite (#ffdead)</li>
|
||
<li><color navy /> navy (#000080)</li>
|
||
<li><color oldlace /> oldlace (#fdf5e6)</li>
|
||
<li><color olive /> olive (#808000)</li>
|
||
<li><color olivedrab /> olivedrab (#6b8e23)</li>
|
||
<li><color orange /> orange (#ffa500)</li>
|
||
<li><color orangered /> orangered (#ff4500)</li>
|
||
<li><color orchid /> orchid (#da70d6)</li>
|
||
<li><color palegoldenrod /> palegoldenrod (#eee8aa)</li>
|
||
<li><color palegreen /> palegreen (#98fb98)</li>
|
||
<li><color paleturquoise /> paleturquoise (#afeeee)</li>
|
||
<li><color palevioletred /> palevioletred (#db7093)</li>
|
||
<li><color papayawhip /> papayawhip (#ffefd5)</li>
|
||
<li><color peachpuff /> peachpuff (#ffdab9)</li>
|
||
<li><color peru /> peru (#cd853f)</li>
|
||
<li><color pink /> pink (#ffc0cb)</li>
|
||
<li><color plum /> plum (#dda0dd)</li>
|
||
<li><color powderblue /> powderblue (#b0e0e6)</li>
|
||
<li><color purple /> purple (#800080)</li>
|
||
<li><color rebeccapurple /> rebeccapurple (#663399)</li>
|
||
<li><color red /> red (#ff0000)</li>
|
||
<li><color rosybrown /> rosybrown (#bc8f8f)</li>
|
||
<li><color royalblue /> royalblue (#4169e1)</li>
|
||
<li><color saddlebrown /> saddlebrown (#8b4513)</li>
|
||
<li><color salmon /> salmon (#fa8072)</li>
|
||
<li><color sandybrown /> sandybrown (#f4a460)</li>
|
||
<li><color seagreen /> seagreen (#2e8b57)</li>
|
||
<li><color seashell /> seashell (#fff5ee)</li>
|
||
<li><color sienna /> sienna (#a0522d)</li>
|
||
<li><color silver /> silver (#c0c0c0)</li>
|
||
<li><color skyblue /> skyblue (#87ceeb)</li>
|
||
<li><color slateblue /> slateblue (#6a5acd)</li>
|
||
<li><color slategray /> slategray (#708090)</li>
|
||
<li><color snow /> snow (#fffafa)</li>
|
||
<li><color springgreen /> springgreen (#00ff7f)</li>
|
||
<li><color steelblue /> steelblue (#4682b4)</li>
|
||
<li><color tan /> tan (#d2b48c)</li>
|
||
<li><color teal /> teal (#008080)</li>
|
||
<li><color thistle /> thistle (#d8bfd8)</li>
|
||
<li><color tomato /> tomato (#ff6347)</li>
|
||
<li><color turquoise /> turquoise (#40e0d0)</li>
|
||
<li><color violet /> violet (#ee82ee)</li>
|
||
<li><color wheat /> wheat (#f5deb3)</li>
|
||
<li><color white /> white (#ffffff)</li>
|
||
<li><color whitesmoke /> whitesmoke (#f5f5f5)</li>
|
||
<li><color yellow /> yellow (#ffff00)</li>
|
||
<li><color yellowgreen /> yellowgreen (#9acd32)</li>
|
||
</ul>
|
||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/react-native/docs/direct-manipulation">← Direct Manipulation</a><a class="docs-next button" href="/react-native/docs/integration-with-existing-apps">Integration with Existing Apps →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/react-native/" class="nav-home"><img src="/react-native/img/header_logo.png" alt="React Native" width="66" height="58"/></a><div><h5><a href="/react-native/docs/getting-started.html">Docs</a></h5><a href="/react-native/docs/getting-started.html">Getting Started</a><a href="/react-native/docs/tutorial.html">Tutorial</a><a href="/react-native/docs/components-and-apis.html">Components and APIs</a><a href="/react-native/docs/more-resources.html">More Resources</a></div><div><h5><a href="/react-native/help.html">Community</a></h5><a href="/react-native/showcase.html">Who's using React Native?</a><a href="http://stackoverflow.com/questions/tagged/react-native" target="_blank">Stack Overflow</a><a href="https://discuss.reactjs.org" target="_blank">Discussion Forum</a><a href="https://discord.gg/0ZcbPKXt5bZjGY5n">Reactiflux Chat</a></div><div><h5>More</h5><a href="/react-native/blog">Blog</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="http://reactjs.org" target="_blank">React</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/react-native/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2018 Facebook Inc.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||
var search = docsearch({
|
||
|
||
apiKey: '2c98749b4a1e588efec53b2acec13025',
|
||
indexName: 'react-native-versions',
|
||
inputSelector: '#search_input_react',
|
||
algoliaOptions: {"facetFilters":["tags:0.56"],"hitsPerPage":5}
|
||
});
|
||
</script></body></html> |