diff --git a/source/Ox.UI/Ox.UI.js b/source/Ox.UI/Ox.UI.js index 1d6f76ba..16542a99 100644 --- a/source/Ox.UI/Ox.UI.js +++ b/source/Ox.UI/Ox.UI.js @@ -309,6 +309,7 @@ Ox.load.UI = function(options, callback) { Ox.UI.getImageURL = function(name, theme, color) { var imageURL; theme = theme || Ox.Theme(); + color = Ox.Theme[theme].color[color] || null; // fixme: not the best idea to do this here if (name == 'symbolPlay') { name = 'symbolRight'; @@ -317,8 +318,8 @@ Ox.load.UI = function(options, callback) { if (options.loadImages && color) { imageURL = 'data:image/svg+xml;base64,' + btoa( atob(imageURL.split(',')[1]).replace( - /#\d{6}/, '#' + Ox.toHex(Ox.Theme[theme].color[color] - )) + /#[0-9A-F]{6}/i, '#' + Ox.toHex(color) + ) ); } return imageURL;