Home / Function/ getColorFormat() — ui Function Reference

getColorFormat() — ui Function Reference

Architecture documentation for the getColorFormat() function in colors.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  8ea83510_f1ba_7165_798c_2ca0693f55a0["getColorFormat()"]
  56f11136_44de_59ff_9172_8077200c483f["colors.ts"]
  8ea83510_f1ba_7165_798c_2ca0693f55a0 -->|defined in| 56f11136_44de_59ff_9172_8077200c483f
  style 8ea83510_f1ba_7165_798c_2ca0693f55a0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/lib/colors.ts lines 25–34

export function getColorFormat(color: Color) {
  return {
    className: `bg-${color.name}-100`,
    hex: color.hex,
    rgb: color.rgb,
    hsl: color.hsl,
    oklch: color.oklch,
    var: `--color-${color.name}-${color.scale}`,
  }
}

Subdomains

Frequently Asked Questions

What does getColorFormat() do?
getColorFormat() is a function in the ui codebase, defined in apps/v4/lib/colors.ts.
Where is getColorFormat() defined?
getColorFormat() is defined in apps/v4/lib/colors.ts at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free