0.0.11 • Published 3 years ago

react-native-reanimated-color-picker v0.0.11

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

react-native-reanimated-color-picker

npm version CircleCI js-standard-style Dependency Status devDependencies Status typings included npm

Natively animated HSV color picker for iOS & Android

Installation

Demo

Example

import * as React from 'react'
import { HueSaturationValuePicker } from 'react-native-reanimated-color-picker'

const wheelStyle = { width: '100%' }
const sliderStyle = { height: 50, width: '100%' }

const colorChanged = ({ h, s, v }) => {
  console.warn(h, s, v)
}

const picker = (
  <HueSaturationValuePicker
    wheelStyle={wheelStyle}
    sliderStyle={sliderStyle}
    onColorChangeComplete={colorChanged}
  />
)

Description

There are three components:

  • HueSaturationWheel - a wheel for selecting hue and saturation with constant value = 1
  • ValueSlider - a slider for selecting value
  • HueSaturationValuePicker - a composition of two first components

The library doesn't provide any color conversion functions, so you have to use a third-party module for color conversion

Reference

HueSaturationWheel props

ValueSlider props

HueSaturationValuePicker props

Credits

  • colorHSV function was taken from react-native-reanimated example by @kmagiera
0.0.10

3 years ago

0.0.11

3 years ago

0.0.8

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.2

5 years ago

0.0.3

5 years ago

0.0.1

5 years ago