I currently have an H1 tag set to color # 8c0000 (dark red).
Using jQuery, I would like to get the color H1, and then do a calculation based on the color h1 to determine what would be the hexadecimal value of the new color if I wanted some shades to be darker.
The reason for this is that I want to use the new CSS3 text-shadow property to create an emboss effect by creating an inset shadow shadow.
To get the color of the H1 elements, I believe it can be done using:
('H1').css('color');
But what should I do with this value to calculate a darker shade?
PS - the view when the color H1 will be set dynamically, I can’t just hardcode the shadow of the fixed text, so I need a calculation ...
Any help would be greatly appreciated. Thank you in advance
source
share