website/versioned_docs/version-0.83/colors.md
Components in React Native are styled using JavaScript. Color properties usually match how CSS works on the web. General guides on the color usage on each platform could be found below:
React Native has several color APIs designed to allow you to take full advantage of your platform's design and user preferences.
React Native supports rgb() and rgba() in both hexadecimal and functional notation:
'#f0f' (#rgb)'#ff00ff' (#rrggbb)'#f0ff' (#rgba)'#ff00ff00' (#rrggbbaa)'rgb(255, 0, 255)''rgb(255 0 255)''rgba(255, 0, 255, 1.0)''rgba(255 0 255 / 1.0)'React Native supports hsl() and hsla() in functional notation:
'hsl(360, 100%, 100%)''hsl(360 100% 100%)''hsla(360, 100%, 100%, 1.0)''hsla(360 100% 100% / 1.0)'React Native supports hwb() in functional notation:
'hwb(0, 0%, 100%)''hwb(360, 100%, 100%)''hwb(0 0% 0%)''hwb(70 50% 0%)'React Native also supports colors as an int values (in RGB color mode):
0xff00ff00 (0xrrggbbaa):::caution This might appear similar to the Android Color ints representation but on Android values are stored in SRGB color mode (0xaarrggbb). :::
In React Native you can also use color name strings as values.
:::info React Native only supports lowercase color names. Uppercase color names are not supported. :::
transparentThis is a shortcut for rgba(0,0,0,0), same like in CSS3.
Named colors implementation follows the CSS3/SVG specification: