import { type DarkColor } from "https://deno.land/x/fresh@1.6.3/plugins/twindv1_deps.ts";
Allows to return a dark color for the given light color.
{
// 50 -> 900, 100 -> 800, ..., 800 -> 100, 900 -> 50
darkColor: autoDarkColor
// custom resolvers
darkColor: (section, key, { theme }) => theme(`${section}.${key}-dark`) as ColorValue
darkColor: (section, key, { theme }) => theme(`dark.${section}.${key}`) as ColorValue
darkColor: (section, key, { theme }) => theme(`${section}.dark.${key}`) as ColorValue
darkColor: (section, key, context, lightColor) => generateDarkColor(lightColor),
}
Or use the light color to generate a dark color
{
darkColor: (section, key, context, color) => generateDark(color)
}
Type Parameters
Theme extends BaseTheme
definition: () => ColorValue | Falsey