@mocanvas/editor · function

useColorMode

declare function useColorMode(): TLColorMode

The colour mode the canvas is painting in, resolved: "system" has already been turned into "light" or "dark" by the time it gets here.

Re-renders the component when the mode changes, including when it changes because the operating system did.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.