Home

tailwind-ctp-intellisense @0a6e5def0009561eb9fcb9898085fee82e9888dc - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / types / culori.d.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
declare module 'culori' {
  export interface RgbColor {
    mode: 'rgb'
    r: number
    g: number
    b: number
    alpha?: number
  }
  export interface HslColor {
    mode: 'hsl'
    h: number
    s: number
    b: number
    alpha?: number
  }
  export type Color = RgbColor | HslColor
  export function parse(color: string): Color | undefined
  export function formatRgb(color: Color | string): string
  export function formatHsl(color: Color | string): string
  export function formatHex(color: Color | string): string
  export function formatHex8(color: Color | string): string

  type Mode = 'rgb' | 'hsl'

  export function converter<T extends Mode>(
    mode: T
  ): (color: Color | string) => T extends 'rgb' ? RgbColor : T extends 'hsl' ? HslColor : never
}