react-native-image-dominant-color
v1.0.3
Published
Get dominant color from image url
Downloads
196
Readme
react-native-image-dominant-color
Get dominant color from image url
Installation
npm install react-native-image-dominant-color --saveor
yarn add react-native-image-colorsInstall Pods
cd ios && pod installUsage
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)
}Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
