Programmatically Change Theme Colors #3243
-
I'm working on a mockup where users can type in a color value and that color then becomes the primary color throughout the application. Based on some digging it looks like DaisyUI stores the primary color values as It makes sense then that running I've tried I've even gone down the list of properties in Chrome debug mode but I've never seen anything related to "primary". Are the CSS primary/secondary/etc properties held elsewhere? Is it even possible to change them without restarting the application? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try getComputedStyle(document.querySelector(':root')).getPropertyValue('--p') Demo https://codepen.io/saadeghi/pen/XWvamwj?editors=0010 Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
Try
Demo https://codepen.io/saadeghi/pen/XWvamwj?editors=0010
Let me know if you have a question.