LCh Color Wheel
A wheel-style color picker based on CIE L*C*h color space.
Installation
npm
$ npm i lch-color-wheel
jsDelivr)
CDN (
Download directly
Usage
// create a new color pickervar colorWheel = // appendTo is the only required property. specify the parent element of the color wheel. appendTo: document // optional properties and default values. wheelDiameter: 200 wheelThickness: 20 handleDiameter: 16 drawsRgbValidityBoundary: false { // the only argument is the LchColorWheel instance itself. // console.log("lch:", colorWheel.lch[0], colorWheel.lch[1], colorWheel.lch[2]) } // set color in LCH / RGBcolorWheellch = 32 134 3062colorWheelrgb = 0 0 255 // get color in LCH / RGBconsoleconsole // please call redraw() after changing some appearance properties.colorWheelwheelDiameter = 400colorWheelwheelThickness = 40colorWheelhandleDiameter = 32colorWheel
License
Sister Package
reinvented-color-wheel: HSV color wheel