New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-image-color-picker

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-image-color-picker

Image color picker based on image source provided and return image different color palettes or average color palette

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45
increased by114.29%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-image-color-picker

Image color picker: Provide image source and it will return

  • Different color palettes out of image
  • Average color palette out of image

Getting started

$ npm install react-native-image-color-picker --save

or

$ yarn add react-native-image-color-picker --save

Usage

import React, { Component } from 'react';
import { ImageColorPicker } from 'react-native-image-color-picker';

export default class App extends Component {

  pickerCallback = message => {
    if (message && message.nativeEvent && message.nativeEvent.data) {
      console.log(message.nativeEvent.data); // response from ImageColorPicker
    }
  };

  render() {
    return (
        ....

        <ImageColorPicker
          imageUrl="https://dummyimage.com/100x100"
          pickerCallback={this.pickerCallback}
        />

        ....
    );
  }
}

Available Props/Options

  • imageUrl: url of image
  • pickerCallback: callback method for ImageColorPicker Success or Failure
  • (optional)imageType: type of image e.g. jpeg, png Default value: jpeg
  • (optional)paletteType: palette type e.g average: for average color of image, dominant: dominant colors in image Default value: dominant
  • (optional)paletteCount: no of color palettes need e.g. 3 dominant color palette, applicable only in case of paletteType: 'dominant' Default value: 3
  • (optional)defaultPalette: default color palette Default value: [0, 0, 0, 1]
  • (optional)colorType: color code type e.g. rgba or hex Default value: rgba
  • (optional)pickerStyle: picker container styles
  • (optional)imageWidth: custom image width, other than natural
  • (optional)imageHeight: custom image height, other than natural

Example App

Example App

TODO

  • Support Image picker gallery

Contributing

Interested in contributing to this repository? PR are most welcome!

Keywords

FAQs

Package last updated on 14 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc