Giter Site home page Giter Site logo

afternoon2 / color-disc Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 3.0 2.82 MB

Procreate-like disc color picker for the web

Home Page: https://codepen.io/jakub_antolak/live/LKxzpJ

License: MIT License

JavaScript 96.80% HTML 1.77% SCSS 1.43%
color-picker colors webcomponents customelements

color-disc's Introduction

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/[email protected]/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');

color-disc's People

Contributors

afternoon2 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.