Extremely Popular
Latest
function autoDarkColor
import { autoDarkColor } from "https://dotland.deno.dev/x/fresh@1.6.8/plugins/twindv1_deps.ts";

Looks for a matching dark color within a tailwind color palette (50, 100, 200, ..., 800, 900).

defineConfig({
  darkColor: autoDarkColor,
})

Note: Does not work for arbitrary values like [theme(colors.gray.500)] or [theme(colors.gray.500, #ccc)].

Parameters

section: string

within theme to use

key: string

of the light color or an arbitrary value

unnamed 2: Context<any>

to use

Returns

the dark color if found