Rezi
    Preparing search index...

    Function resolveColorToken

    • Resolve a color token path to an RGB value.

      Parameters

      • theme: ThemeDefinition

        The theme definition containing color tokens

      • path: ColorPath

        Dot-notation path (e.g., "fg.primary", "error")

      Returns Rgb

      The resolved RGB color, or null if path is invalid

      const color = resolveColorToken(darkTheme, "fg.primary");
      // { r: 230, g: 225, b: 207 }

      const error = resolveColorToken(darkTheme, "error");
      // { r: 240, g: 113, b: 120 }
    • Resolve a color token path to an RGB value.

      Parameters

      • theme: ThemeDefinition

        The theme definition containing color tokens

      • path: string

        Dot-notation path (e.g., "fg.primary", "error")

      Returns Readonly<{ b: number; g: number; r: number }> | null

      The resolved RGB color, or null if path is invalid

      const color = resolveColorToken(darkTheme, "fg.primary");
      // { r: 230, g: 225, b: 207 }

      const error = resolveColorToken(darkTheme, "error");
      // { r: 240, g: 113, b: 120 }