palette function
The colours of a list as `#rrggbb`, such as a brand palette in a param: any CSS colour, `var(--brand)` (its value or fallback, followed 8 levels deep) and `currentColor` read from the element's computed style, as `cssColor` of `@dioramajs/render` reads them.
import { palette } from '@dioramajs/diorama/kit'. Spaces and commas outside parentheses separate the colours; words that are no colour are left out. Read at the call: a later change of a variable shows when the effect reads the list again.
function palette(text: string, element: Element): string[]Parameters
| Name | Type | Description |
|---|---|---|
text | string | |
element | Element |
Also exported from @dioramajs/effects/kit.
Defined in packages/effects/src/kit.ts.