I would like to add code in to detect if the portfolio and showcase background image is light or dark to change the hero title, magic cursors and burger menu colour to be seen better.
So if the hero is dark then white is used for the hero title, magic cursors and burger menu.
If the hero is a light colour then the hero title, magic cursors and burger menu will be black.
Which file would need to be edited to achieve this?
I would like to add code in to detect if the portfolio and showcase background image is light or dark to change the hero title, magic cursors and burger menu colour to be seen better.
So if the hero is dark then white is used for the hero title, magic cursors and burger menu.
If the hero is a light colour then the hero title, magic cursors and burger menu will be black.
Which file would need to be edited to achieve this?
Hi James,
Yes, you can add the background color type (White or Black) of the page and the logo and font color will change accordingly.
Otherwise, if you want more than this, you cam modify /js/scripts.js
look into the functions PageLoad() and FirstLoad()
just to give you an example
if ($('#hero-bg-image').hasClass("light-content")) {
$('#hero-caption').addClass('light-content');
setTimeout(function(){
$('#magic-cursor').addClass('light-content');
} , 700 );
setTimeout(function(){
$('#header-container').addClass('light-content');
} , 600 );
}
Thank you.
Clapat Support
https://www.clapat.com/
Review Envato Item Support Policy
Thanks for your reply.
This is what I had in mind, the below links are automatically detecting the image colour brightness and is adjusting the various elements accordingly.
Is this possible to add? and would it be the same functions as mentioned before?
In firstLoad() i added
My aim is to get the logo, magic cursor and the burger menu to switch colours based on the image below it's brightness.
We heave never use these plugins and also require e lot o customizations to integrate it on our theme.
Thank you.
Clapat Support
https://www.clapat.com/
Review Envato Item Support Policy