Reference · SVG faces and looks
clothVarsfunction
A cloth as CSS custom properties (--jarajara-felt, --jarajara-felt-deep, --jarajara-felt-ink); nothing for a name that is not a cloth.
Import it
import { clothVars } from "@johnmorrisdotca/jarajara/faces";
Definition
function clothVars(cloth: string | undefined | null): Record<`--jarajara-${string}`, string>
Parameters
| Name | Type | Description |
|---|---|---|
cloth | string | null | undefined | The named native cloth theme. |
Returns
Record<`--jarajara-${string}`, string>
A cloth as CSS custom properties (--jarajara-felt, --jarajara-felt-deep, --jarajara-felt-ink); nothing for a name that is not a cloth.
Examples
import { clothVars } from "@johnmorrisdotca/jarajara/faces";
console.log(clothVars("green"));{
'--jarajara-felt': '#2f5d4a',
'--jarajara-felt-deep': '#1f4135',
'--jarajara-felt-ink': '#f3efe4'
}What it prints (run when this page was built)