Change Portal button color using javascript?

I’m having trouble finding which element(s) to access in order to change the Portal button color (or other properties) using javascript (e.g., for dark mode vs. light mode). Does anyone know how to do this? Using “inspect” made it look like changing “brandcolor” might do it, but that didn’t work.