Sharvan Gehlot

Results 3 comments of Sharvan Gehlot

Use themes for dark mode - E.g. book.rendition.themes.register("black", { "body": { "background-color": "#111111" }, "html": { "-webkit-filter": "invert(1) hue-rotate(180deg)", "filter": "invert(1) hue-rotate(180deg)" }, "img": { "-webkit-filter": "invert(1) hue-rotate(180deg)", "filter": "invert(1)...

Change the main DIV color (book's default background color) during change the theme. ex. If Lightmode $('#main').css("background", "#ffffff"); If DarkMode $('#main').css("background", "#000000");

May this help you const themeWrapper = document.querySelector('body'); themeWrapper.style.setProperty('--primaryColor', StyleService.primary.medium); themeWrapper.style.setProperty('--primaryLightColor', StyleService.primary.light); themeWrapper.style.setProperty('--primaryDarkColor', StyleService.primary.dark);