Skip to content

Intermact API Reference / @intermact/render-three / parseColor

Function: parseColor() ​

parseColor(css, fallback?): ParsedColor

Defined in: color.ts:14

Parse a CSS color string into a three.js Color plus alpha. three's Color ignores alpha, so we extract it from rgba()/hsla() ourselves and fall back to Color's own parsing for hex/named/rgb.

Parameters ​

css ​

string | undefined

fallback? ​

string = "#ffffff"

Returns ​

ParsedColor

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)