PhotonUI logo

PhotonUI

A javascript framework to create user interfaces

ColorPalette

Class Reference

More examples

Custom palette

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var palette = new photonui.ColorPalette({
palette: [
["#D32F2F", "#F44336", "#E91E63", "#9C27B0", "#673AB7"],
["#3F51B5", "#2196F3", "#03A9F4", "#00BCD4", "#009688"],
["#4CAF50", "#8BC34A", "#CDDC39", "#FFEB3B", "#FFC107"],
["#FF9800", "#FF5722", "#795548", "#9E9E9E", "#607D8B"]
],
callbacks: {
"value-changed": function(widget, value) {
var header = document.getElementsByTagName("header")[0];
header.style.backgroundColor = value;
}
}
});

photonui.domInsert(palette, "demo");