I’m using canvas in web app built with jquery ui. I added the theme-roller widget and want the canvas elements to be themeable. So the problem I’m facing is, how do I programatically access css class properties to use while drawing canvas objects?
this is what I tried:
var color = $("<div></div>").addClass("ui-state-default").css("background-color");
Got it. The element needed to be added to the DOM.
rgb2hex code taken from: http://haacked.com/archive/2009/12/29/convert-rgb-to-hex.aspx