0.1.2 • Published 10 months ago

@tanbo/color-picker v0.1.2

Weekly downloads
27
License
MIT
Repository
github
Last release
10 months ago

颜色选择器

安装

npm install @tanbo/color-picker

使用

import { createPicker } from '@tanbo/color-picker';

const picker = createPicker(document.getElementById('picker'));

// 当用户确认选中颜色后触发
picker.onSelected = function () {
  console.log(picker.rgb)
}

// 当用户选择颜色时触发
picker.onChange = function () {
  console.log(picker.rgb)
}

// 添加最近使用的颜色
picker.addRecentColor('#f00')

// 设置选择器的颜色,你还可以设置其它格式,如 rgba、hex、hsl 等
picker.rgb = {
  r: 255,
  g: 255,
  b: 255
};
0.1.2

10 months ago

0.1.1

10 months ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago