UseColorScheme
Last updated: 2.6.0 (09/06/2024)
Last updated
Was this helpful?
Last updated: 2.6.0 (09/06/2024)
Last updated
Was this helpful?
useColorScheme
is a hook that provides the current preferred color scheme of the user's operating system. It also allows the app to toggle between light and dark color schemes.
Internally, this hook is used by the to provide the correct colors for the user's preferred color scheme.
colorScheme
ColorScheme
The color scheme.
isDarkMode
boolean
Is the color scheme "dark"
?
isLightMode
boolean
Is the color scheme "light"
?
isFollowingSystem
boolean
Is the color scheme following the system theme?
Removed toggle
, setDark
and setLight
; added isFollowingSystem