var CreatePalette = function(color) {
var div = document.getElementById("colorTable");
div.innerHTML = "";
var r = parseInt(color.replace("#","").substring(0,2), 16);
var b = parseInt(color.replace("#","").substring(2,4), 16);
var g = parseInt(color.replace("#","").substring(4,6), 16);
var colorDiv;
for(var i = 0; i < 26; i++) {
colorDiv = document.createElement("div");
colorDiv.style.backgroundColor = color;
colorDiv.style.padding = "2px";
colorDiv.style.fontFamily = "돋움, dotum, verdana";
colorDiv.innerText = color.toUpperCase();
div.appendChild(colorDiv);
r = (r + 10 < 255) ? r + 10 : r;
b = (b + 10 < 255) ? b + 10 : b;
g = (g + 10 < 255) ? g + 10 : g;
red = (r.toString(16).length <= 1) ? "0" + r.toString(16) : r.toString(16);
blue = (b.toString(16).length <= 1) ? "0" + b.toString(16) : b.toString(16);
green = (g.toString(16).length <= 1) ? "0" + g.toString(16) : g.toString(16);
if(color == "#" + red + blue + green) {
return false;
} else {
color = "#" + red + blue + green;
}
}
}