--- title: useColorMode description: "`useColorMode` is a custom hook that returns the current color mode." links: - source: https://github.com/yamada-ui/yamada-ui/tree/main/packages/react/src/hooks/use-color-mode - storybook: https://yamada-ui.github.io/yamada-ui?path=/story/hooks-usecolormode--basic --- ```tsx const { colorMode } = useColorMode() return The current colorMode is "{colorMode}" ``` ## Usage ```tsx import { useColorMode } from "@yamada-ui/react" ``` ```tsx import { useColorMode } from "@/components/ui" ``` ```tsx import { useColorMode } from "@workspaces/ui" ``` ```tsx const { changeColorMode, colorMode, internalColorMode, toggleColorMode } = useColorMode() ``` :::tip Color Mode overview is [here](https://yamada-ui.com/docs/styling/color-mode.md). ::: ### Switching Color Mode - `colorMode`: Provides the current color mode. - `internalColorMode`: Provides the current color mode including `system`. ```tsx const { colorMode, internalColorMode, changeColorMode, toggleColorMode } = useColorMode() return ( The current colorMode is "{colorMode}", internal colorMode is " {internalColorMode}" ) ```