Get dominant color from image url
npm install react-native-image-dominant-color --save
or
yarn add react-native-image-colors
Install Pods
cd ios && pod install
import { getColor } from 'react-native-image-dominant-color';
// ...
async function getDominantColor(imageUrl: string): Promise<void> {
const result = await getColor('https://all-image.com/1.jpg'); // your image url
console.log(result.dominantColor); //Ex rgba(64.0, 72.0, 240.0, 1.0)
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library