Home / Function/ getRegistryBaseColor() — ui Function Reference

getRegistryBaseColor() — ui Function Reference

Architecture documentation for the getRegistryBaseColor() function in api.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  f583974e_f2e2_3690_ea81_1fb05cabe658["getRegistryBaseColor()"]
  c41eed12_c415_48c8_bcf4_9d09d3424a18["api.ts"]
  f583974e_f2e2_3690_ea81_1fb05cabe658 -->|defined in| c41eed12_c415_48c8_bcf4_9d09d3424a18
  style f583974e_f2e2_3690_ea81_1fb05cabe658 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/src/registry/api.ts lines 199–207

export async function getRegistryBaseColor(baseColor: string) {
  try {
    const [result] = await fetchRegistry([`colors/${baseColor}.json`])

    return registryBaseColorSchema.parse(result)
  } catch (error) {
    handleError(error)
  }
}

Subdomains

Frequently Asked Questions

What does getRegistryBaseColor() do?
getRegistryBaseColor() is a function in the ui codebase, defined in packages/shadcn/src/registry/api.ts.
Where is getRegistryBaseColor() defined?
getRegistryBaseColor() is defined in packages/shadcn/src/registry/api.ts at line 199.

Analyze Your Own Codebase

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

Try Supermodel Free