Comments (6)
Okay, I will create PR on days
from react-native-image-colors.
@KrzysztofMoch Yeah my minimal suggestion here is that the error message is improved. Instead of:
Error: Unknown color
It should be:
Error: Unknown fallback color. Do not use shorthand hex e.g. #fff.
This will make debugging easier for future developers. If you can support shorthand that would be even better but not necessarily needed.
Edit: I thought the error was saying it could not detect the color of the image but it was related to the fallback color which took me awhile to realize.
from react-native-image-colors.
@KrzysztofMoch I update the bug report. This only happens when the fallback color is set to #000
. On iOS this works but on Android this throws an error. See my description for further details.
To answer your question, it happens for all pictures when given the fallback #000
. I fixed it when I gave the fallback #000000
. For Android you must give a full hex code otherwise this error is thrown.
from react-native-image-colors.
Yes In docs for fallback collor
fallback collor: If a color property couldn't be retrieved, it will default to this hex color string (note: do not use shorthand hex. e.g. #fff).
You must to use 6 characters (e.g #000000
)
from react-native-image-colors.
@osamaqarem should we add support for 3 chars colros on android ?
from react-native-image-colors.
@osamaqarem should we add support for 3 chars colros on android ?
If you would like to go for it, that would be nice 👍
Otherwise the report makes a good point, it would be easy for us to detect the length of the fallback string and throw a friendly error.
from react-native-image-colors.
Related Issues (20)
- Expo "Possible Unhandled Promise Rejection: TypeError: Cannot read property 'getColors' of undefined" issue HOT 7
- Not working with locally cached images HOT 1
- TypeError: null is not an object (evaluating '_module.RNImageColors.getColors') HOT 15
- This is not working in Apple tv . HOT 8
- Need to update kotlin-gradle-plugin to 1.6.20 as kotlin-android-extensions needs gradle plugin version >= 1.6.20 HOT 1
- [Error: ImageColors: Invalid image URI – failed to get image]
- can get same color both ios and android? HOT 1
- ImageColors: Illegal character in path HOT 4
- Error when building for Android with Expo SDK 49 and React Native 0.72.1 HOT 2
- this package is not working HOT 2
- Error in react native CLI HOT 7
- Pod install not working after installing react-native-image-colors HOT 3
- Cannot find native module 'ImageColors' HOT 9
- [iOS] Doesn't build with RN 0.73
- [Android] build failed HOT 1
- [iOS] Replace iOS underlying implementation
- Question: How to get the colors for a portion of an image
- [Expo 51] Build failed on android
- Can not find native module ImageColors in react native cli HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-image-colors.