use-colors.ts — ui Source File
Architecture documentation for use-colors.ts, a typescript file in the ui codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 0afe41ac_4a55_c782_f9c9_dd70a39388de["use-colors.ts"] cba8a664_3253_9b8c_8abe_9f0e33bbc037["jotai"] 0afe41ac_4a55_c782_f9c9_dd70a39388de --> cba8a664_3253_9b8c_8abe_9f0e33bbc037 68f194ce_9060_f5f9_d266_dd66c3d544fb["utils"] 0afe41ac_4a55_c782_f9c9_dd70a39388de --> 68f194ce_9060_f5f9_d266_dd66c3d544fb 5281a958_99ee_42f0_65d8_3fb6d850517a["colors"] 0afe41ac_4a55_c782_f9c9_dd70a39388de --> 5281a958_99ee_42f0_65d8_3fb6d850517a 47758573_16e6_4808_88b2_8dba3780ae24["use-mounted"] 0afe41ac_4a55_c782_f9c9_dd70a39388de --> 47758573_16e6_4808_88b2_8dba3780ae24 style 0afe41ac_4a55_c782_f9c9_dd70a39388de fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { useAtom } from "jotai"
import { atomWithStorage } from "jotai/utils"
import { ColorFormat } from "@/lib/colors"
import { useMounted } from "@/hooks/use-mounted"
type Config = {
format: ColorFormat
}
const colorsAtom = atomWithStorage<Config>("colors", {
format: "hsl",
})
export function useColors() {
const [colors, setColors] = useAtom(colorsAtom)
const mounted = useMounted()
return {
isLoading: !mounted,
format: colors.format,
setFormat: (format: ColorFormat) => setColors({ format }),
}
}
Domain
Subdomains
Functions
Types
Dependencies
- colors
- jotai
- use-mounted
- utils
Source
Frequently Asked Questions
What does use-colors.ts do?
use-colors.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in use-colors.ts?
use-colors.ts defines 1 function(s): useColors.
What does use-colors.ts depend on?
use-colors.ts imports 4 module(s): colors, jotai, use-mounted, utils.
Where is use-colors.ts in the architecture?
use-colors.ts is located at deprecated/www/hooks/use-colors.ts (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/hooks).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free