Fork me on GitHub

Project Notes

#159 Pickers for the Web

Looking at easy ways to enable a color picker on a web page

Notes

How to let a user pick a color on a web page?

That ued to be a non-trivial coding problem, but then there cam some good Javascript libraries such as jscolor. These are still the best bet for maximal cross-browser compatibility.

These days however, the preferred option would be to use the HTML5 <input type="color"> element.

HTML5 Example

Open the example.html for a quick demonstration of the HTML5 color picker component:

example.png

jscolor Example

See jscolor-examples.html - this is straight from the jscolor distribution:

jscolor-example.png

Credits and References

About LCK#159 javascriptHTML5
Project Source on GitHub Return to the Project Catalog

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.

LittleArduinoProjects LittleModelArt More on my blog