# react-native-find-image-color

> This plugin detects most used color in an image

Latest version **0.1.1** (published 2023-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-find-image-color
pnpm add react-native-find-image-color
yarn add react-native-find-image-color
bun add react-native-find-image-color
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-12-24 |
| First published | 2023-12-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18.0.0 |
| Dependencies | 1 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Akifcan Kara |
| Maintainers | akifcan |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-find-image-color
- Repository: https://github.com/akifcan/react-native-find-image-color
- Homepage: https://github.com/akifcan/react-native-find-image-color#readme
- Issues: https://github.com/akifcan/react-native-find-image-color/issues
- npm.io page: https://npm.io/package/react-native-find-image-color

## Dependencies (1)

- [react-native-webview](https://npm.io/package/react-native-webview.md) ^13.3.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2023-12-24

## README

# react-native-find-image-color

This plugin detects most used color in an image

## SIGNIFICANT NOTE

- This package depends on `react-native-webview` plugin and if you have already installed `react-native-webview` in your project make sure you have the same versions otherwise you'll get an error. If you faced an error fork this repository and update `react-native-webview` version.

- Current Version is: **^13.3.0"** (24 December 2023)

### Example

```
"dependencies" : {
  Your repo url with updated react-native-webview version
  "react-native-find-image-color" : "git://github.com/user/project.git",
  ...

```

## Installation 

`yarn add react-native-find-image-color`  or  `npm i react-native-find-image-color`

## Usage

```
import ColorWebview from 'react-native-find-image-color'
<ColorWebview
    base64={route.params.base64}
    onGenerate={color => {
        console.log(color)
    }}
/>
```

## Why only base64 image

- You can get cors error because of some cdn configurations (IE. Amazon S3 Links) but if you convert the links to base64 you can get the colors.

 - ### Example Base64 Convert

 ```
    let imagePath: string = ''
    const resp = await RNFetchBlob.config({
      fileCache: true,
    }).fetch('GET', url)
    imagePath = resp.path()
    const base64 = await resp.readFile('base64')
    fs.unlink(imagePath)
 ```

## Note

- If you try webview with `react-native-view-shot` you'll need to remove webview from dom before the shot.


## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)

---
_Source: https://npm.io/package/react-native-find-image-color · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
