Menu to select color

Asked

Viewed 679 times

6

I’m making a tool, and I need a menu for color selection. Could someone tell me how to do?
Something like that:

2 answers

6


With HTML5 simply use input guy color:

Escolha a cor: <input type="color">

Note: not all browsers support this kind of input.

Or else use a plugin Javascript, as the http://jscolor.com/

  • Thanks, that’s all I needed. I didn’t know this type color rsrs.

  • @Superbomber keep in mind that not all browsers support this type of input, see here.

3

This particular image Picker is the seems to me to be the Spectrum. With it, just make the inclusion of the files

<script src='spectrum.js'></script>
<link rel='stylesheet' href='spectrum.css' />

and make the call as a jQuery plugin in your selector, something like:

$("#custom").spectrum({
    color: "#f00"
});
  • 2

    Inspect Element from Mozilla

Browser other questions tagged

You are not signed in. Login or sign up in order to post.