Dojo ColorPalette
In this section, you will learn about dojo ColorPalette.
ColorPalette: The ColorPalette is a color picker to the web pages. ColorPalette provides you a lot of colors, user can choose color to your requirement. This is an abstraction of hexa colors code that is provided by dijit.
Try Online: ColorPalette
Here is the code of Example:
<html> <head> <title>ColorPalette Demo</title> <style type="text/css"> @import "../dijit/themes/soria/soria.css"; @import "/resources/dojo.css"; </style> <script type="text/javascript" src="dojo.xd.js" djConfig="parseOnLoad: true"></script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dijit.ColorPalette"); function myColorPalette(selectColor) { console.debug(selectColor); } </script> </head> <body class="soria"> <div dojoType="dijit.ColorPalette" onChange="myColorPalette"></div> </body> </html>
Output: