1.3.2 • Published 6 years ago

color-range-picker v1.3.2

Weekly downloads
2
License
GPL-3.0+
Repository
github
Last release
6 years ago

Color Range Picker

Inspired by @wieringen's tinycolorpicker, this small library renders a color circle from a configurable set of colors and can generate a range of shades from the picked color.
Demo

Install

npm i color-range-picker --save

Public properties and methods

NameTypeDescriptionReturns
hexaccessorGet the hexadecimal notation of the last chosen colorString
rgbaccessorGet the rgb notation of the last chosen colorString
RGBToHex(Array/String)static methodConvert a RGB array or string to hexadecimal stringString
hexToRGB(Array/String)static methodConvert a hexadecimal string to a RGB arrayArray/null
range(Array/String, Number)static methodGenerate a range of colors from the currently picked colorArray/null
getFormat(Array/String)static methodCheck the color formatString
toggle()methodShow or hide the uivoid
destroy()methodRemove the UI from the DOMvoid