Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

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.

View as Markdown
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

NameTypeDescription
textstring
elementElement

Also exported from @dioramajs/effects/kit.

Defined in packages/effects/src/kit.ts.