I want to select the color for the title which is a text inside an svg. The color has to be darker or lighter depending on the background-color of the body or the div containing the svg. The body may not have any background color specified. How to find background color to understand the theme so that I can decide whether to use darker or lighter color.
NOTE: I am using jquery.colorBrightness.js to understand whether the background color is dark or light