Skip to main content

processColor

Turns a color into the number that React Native passes to native code. Libraries call it. An app seldom needs it.

import { processColor } from 'react-native'

processColor('red') // 4294901760, which is 0xffff0000
InputResult
A color that React Native can parseAn unsigned 32-bit ARGB integer, as on iOS.
A color that React Native can't parsenull.
null or undefinedThe same value.

Android returns the same bits as a signed integer. On the web, the number is always unsigned.