Skip to content

Commit

Permalink
Rearrange files, add destroy and isDark methods, allows any initial e…
Browse files Browse the repository at this point in the history
…lement, improves demo
  • Loading branch information
jasonhibbs committed Mar 10, 2018
1 parent b381064 commit 09c4121
Show file tree
Hide file tree
Showing 21 changed files with 2,211 additions and 854 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Finally, a usable (accessible, rational, and responsive) colour picker for the web.

[Demo](http://colourpicker.jasonhibbs.co.uk/)
[Demo](http://colourpicker.jasonhibbs.co.uk/)

## Why?

Expand All @@ -12,16 +12,24 @@ The premise is simple: let people type their colour, or let them find one using

## Setup

Add the required files…

```
<link rel="stylesheet" href="colourpicker.css">
<script src="jquery.min.js"></script>
<script src="tinycolor.js"></script>
<script src="colourpicker.js"></script>
```

Then…

```
<input type="colour"/>
```

Include jQuery, TinyColor, and the ColourPicker files, and simply put an `<input type="colour"/>` wherever you need one, or initialise an input with `$('#input').colourPicker(options);`.

Yes, that's the Old French spelling. Yes, it must be an input.
Yes, that's the Old French spelling.

### Compatibility

Expand Down Expand Up @@ -52,6 +60,7 @@ $('#input').colourPicker('hue' [, 0-360]);
$('#input').colourPicker('saturation' [, 0-1]);
$('#input').colourPicker('value' [, 0-1]);
$('#input').colourPicker('alpha' [, 0-1]);
$('#input').colourPicker('isDark');
$('#input').colourPicker('show');
$('#input').colourPicker('hide');
$('#input').colourPicker('toggle');
Expand Down
File renamed without changes.
Loading

0 comments on commit 09c4121

Please sign in to comment.