JSPM

color-from-image

1.0.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 5
    • Score
      100M100P100Q26148F
    • License MIT

    Pick color from an image

    Package Exports

    • color-from-image
    • color-from-image/dist/index.js
    • color-from-image/dist/index.modern.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-from-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    color-from-image

    Pick color from an image

    NPM JavaScript Style Guide

    Demo

    ScreenShot

    Install

    npm install --save color-from-image

    Usage

    import React from 'react'
    
    import ColorFromImage from 'color-from-image'
    
    const App = () => {
      return <ColorFromImage src='...' />
    }
    
    export default App

    Documentation

    You can use all img attributes.

    Parameter Type Description
    hideColor boolean To hide color view in hex.
    onChangeColor (hexColor: string) => void To get color on mouse moved.
    onChooseColor (hexColor: string) => void To get color on click.

    License

    MIT © abdulrahmanAlh