Sleek HTML5 / Javascript Color Picker – iro.js

Category: Color , Javascript | August 12, 2018
Author: jaames
Views Total: 3,325
Official Page: Go to website
Last Update: August 12, 2018
License: MIT

Preview:

Sleek HTML5 / Javascript Color Picker – iro.js

Description:

iro.js is a sleek, HSV color based JavaScript color picker for generating a pretty, HTML5 canvas based color wheel UI with touch support.

How to use it:

Add the core JavaScript library to the html page:

<script src="iro.min.js"></script>

Create a placeholder element for the color picker.

<div class="wheel" id="colorWheelDemo"></div>

Generate a basic color picker inside the container ‘colorWheelDemo’.

var colorWheel = iro.ColorWheel("#colorWheelDemo", {
    // options here
});

Possible options to customize your color picker.

var colorWheel = iro.ColorWheel("#colorWheelDemo", {
    padding: 6,
    borderWidth: 0,
    borderColor: '#fff',
    display: 'block',
    anticlockwise: false,
    width: 320,
    height: 320,
    sliderHeight: undefined,
    sliderMargin: 24,
    markerRadius: 8,
    wheelLightness: undefined,
    CSS: {} // apply colors to any elements
});

Changelog:

08/12/2018

  • v3.4.3: fix touch scrolling intervention in chrome

08/08/2018

  • v3.4.2: Fixes a warning caused by some recent Chrome changes

08/02/2018

  • v3.4.1: Fixed rounding issues when converting between color models, particularly when converting certain colors from RGB hex -> HSL -> RGB hex.

3 thoughts on “Sleek HTML5 / Javascript Color Picker – iro.js

  1. pablo79

    Hello,
    Thank you for this script.
    Is it possible to send three RGB values to a POST function for some php script?

    Reply

Leave a Reply