0.1.9 • Published 2 months ago

color-picker-temperature v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Color Picker Temperature

Kelvin

Installing

npm

npm i color-picker-temperature

yarn

yarn color-picker-temperature

pnpm

pnpm color-picker-temperature

Usage

instance - selector id or class  (required)

optionsCanvas : {
  width:number|string;  (required) if string '100px' or '100%'
  height:number|string;  (required) if string '100px' or '100%'
  rgbColor?:string; color that need set
  kelvinStart?:number; from 1000
  kelvinEnd?:number;   to 40000
}

rgbColor:string; color that need set

### Methods ColorTemperature

cretate - create your own instance

getColor => getColor(callback)

destroyed - deletes a component

Example

import { ColorTemperature } from "color-picker-temperature";

function getColor(color) {
  console.log(color);
}
const instance = "#dd";
const optionsCanvas = {
  width: "100%",
  height: 100,
  kelvinStart: 1000,
  kelvinEnd: 40000,
  rgbColor: "rgb(255, 246, 247)",
};

const colorTemperature = new ColorTemperature();
colorTemperature.create(instance, optionsCanvas);
colorTemperature.getColor(getColor);

setTimeout(() => {
  // if you need to delete a component
  colorTemperature.destroyed();
}, 10000);
0.1.9

2 months ago

0.1.8

2 months ago

0.1.7

2 months ago

0.1.6

2 months ago

0.1.5

2 months ago

0.1.2

2 months ago

0.1.1

2 months ago

0.1.4

2 months ago

0.1.3

2 months ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago