Home / Function/ useColors() — ui Function Reference

useColors() — ui Function Reference

Architecture documentation for the useColors() function in use-colors.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  3a057f8f_09d8_badc_8be9_985949dd4c78["useColors()"]
  64ac49ae_e8db_e100_b63f_28db1f72ecf8["use-colors.ts"]
  3a057f8f_09d8_badc_8be9_985949dd4c78 -->|defined in| 64ac49ae_e8db_e100_b63f_28db1f72ecf8
  style 3a057f8f_09d8_badc_8be9_985949dd4c78 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/hooks/use-colors.ts lines 17–28

export function useColors() {
  const [colors, setColors] = useAtom(colorsAtom)
  const mounted = useMounted()

  return {
    isLoading: !mounted,
    format: colors.format,
    lastCopied: colors.lastCopied,
    setFormat: (format: ColorFormat) => setColors({ ...colors, format }),
    setLastCopied: (lastCopied: string) => setColors({ ...colors, lastCopied }),
  }
}

Subdomains

Frequently Asked Questions

What does useColors() do?
useColors() is a function in the ui codebase, defined in apps/v4/hooks/use-colors.ts.
Where is useColors() defined?
useColors() is defined in apps/v4/hooks/use-colors.ts at line 17.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free