jquery/jquery-color

Parse color from css vars ?

resarahman opened this issue · 1 comments

is it possible to get the color object from css vars ? for example like this jQuery.Color( 'var(--heading-color)' )
or is there any method to extend to jQuery.Color to parse the css variable ?

Thanks

mgol commented

From README:

// Helper to get value from CSS
jQuery.Color( element, cssProperty );

cssProperty can be a CSS variable like --heading-color, you just need to use jQuery 3.2 or newer.