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

color-disc

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-disc

Disc color picker for the web

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ColorDisc.js

Procreate-like disc color picker for the web

Published on webcomponents.org

Demo on CodePen

Color Disc Screen

Installation

Yarn/npm

yarn add color-disc

npm install --save color-disc

Add this snippet to your root javascript file:

  import 'color-disc';

CDN

<script src="https://unpkg.com/color-disc@1.0.1/dist/color-disc.min.js"></script>

Usage

Add color-disc to your HTML markup:

<color-disc size="220" format="hex"></color-disc>

Where

  • size - is a number (in pixels, defaults to 390px)
  • format - is an output color format - hsl, rgb or hex (defaults to hsl)

To read the picked color use element.getAttribute() method:

const color = document
  .querySelector('color-disc')
  .getAttribute('color');

Keywords

FAQs

Package last updated on 17 Jul 2019

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