There is currently a brandColor and brandColorAlpha function which return the brand color based on the active theme.
However, when used in components, changing the theme does not cause a re-render, as it only changes a data attribute in the html element.
Provide custom hooks which observe the changing of this attribute and update a piece of state, so that changing the theme updates components using colors based on the theme.
Provide also a generic hook which accepts the light and dark colors to be provided, so that consumers can use them for any arbitrary combination of two colors.
const brandColor = useBrandColor();
const someColor = useColor(lighColor, darkColor);
```
There is currently a
brandColorandbrandColorAlphafunction which return the brand color based on the active theme.However, when used in components, changing the theme does not cause a re-render, as it only changes a data attribute in the html element.
Provide custom hooks which observe the changing of this attribute and update a piece of state, so that changing the theme updates components using colors based on the theme.
Provide also a generic hook which accepts the light and dark colors to be provided, so that consumers can use them for any arbitrary combination of two colors.