New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tanbo/color-picker

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanbo/color-picker

颜色选择器 ===========================================

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

颜色选择器

安装

npm install @tanbo/color-picker

使用

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

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

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

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

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

FAQs

Package last updated on 15 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc