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

color function

Colour param.

View as Markdown
import { color } from '@dioramajs/diorama'

A CSS colour string on the CPU, as written; a color uniform on the GPU. The uniform reads var(--name) and currentColor from the element when the value is written and again in every frame the element draws, so a theme switch shows with the next frame. Code that reads the string itself resolves it with cssColor(value, element) of @dioramajs/render.

function color(value: string): ColorParam

Parameters

NameTypeDescription
valuestring

Also exported from @dioramajs/diorama/auto, @dioramajs/diorama/effects, @dioramajs/effects.

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