Ad

Adjust Icon Colors Based On The Background's Color

- 1 answer

I have a developer working on an app. The app is built in React Native. I asked if is possible to adjust the colour of some icons depending on the image below:

  • Detect the background color/average color/average tone? If the background image is darker, make the icons white
  • Detect the background color/average color/average tone? If the background image is lighter, make the icons black

I have received the answer that it is not possible, even tho' I have read some time ago that it could be done in Swift and even in React if compiled in xCode. My code knowledge is limited and I have no code to offer. I would like to know only if it's possible or not to achieve such feature in React Native.

Ad

Answer

okay, i've never tried this , but i think if you detect the color from backend it would be great coz RN is a bit rigid and currently it doenst provide any color picker from image. Do check this out npmjs.com/package/react-native-image-color-picker

Ad
source: stackoverflow.com
Ad