This commit is contained in:
rolux 2012-12-29 13:58:24 +01:00
parent 8bc189c471
commit 905c7390a2

View file

@ -30,13 +30,13 @@ Ox.Theme = (function() {
function renderElement(value, type) {
var $element, background, color, data = that.getThemeData();
if (type == 'hue') {
background = Ox.rgb(value, 1, data.themeLightnessBackground);
color = Ox.rgb(value, 1, data.themeLightnessColor);
background = Ox.rgb(value, 1, data.themeBackgroundLightness);
color = Ox.rgb(value, 1, data.themeColorLightness);
} else if (type == 'saturation') {
background = Ox.range(7).map(function(i) {
return Ox.rgb(i * 60, value, data.themeLightnessBackground);
return Ox.rgb(i * 60, value, data.themeBackgroundLightness);
});
color = Ox.rgb(0, 0, data.themeLightnessColor);
color = Ox.rgb(0, 0, data.themeColorLightness);
} else if (type == 'lightness') {
background = Ox.range(3).map(function() {
return Math.round(value * 255);
@ -46,11 +46,11 @@ Ox.Theme = (function() {
});
} else if (type == 'gradient') {
background = Ox.range(2).map(function(i) {
return Ox.rgb(value, 1, data.themeLightnessBackground).map(function(value) {
return Ox.rgb(value, 1, data.themeBackgroundLightness).map(function(value) {
return value + (i == 0 ? 16 : -16);
});
});
color = Ox.rgb(value, 1, data.themeLightnessColor);
color = Ox.rgb(value, 1, data.themeColorLightness);
}
$element = $('<div>')
.addClass(