Skip to content

Programmatically Change Theme Colors #3243

Closed Answered by saadeghi
eerickson5 asked this question in Q&A
Discussion options

You must be logged in to vote

Try

getComputedStyle(document.querySelector(':root')).getPropertyValue('--p')

Demo https://codepen.io/saadeghi/pen/XWvamwj?editors=0010

Let me know if you have a question.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eerickson5
Comment options

Answer selected by eerickson5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants