Search Docs
Loading...
Skip to content

Interface: DominantColor

Dominant color sample returned from block.getDominantColors.

Properties#

Property Type Description
r number Red component in sRGB, normalized to [0, 1].
g number Green component in sRGB, normalized to [0, 1].
b number Blue component in sRGB, normalized to [0, 1].
weight number Share of analyzed pixels represented by this color, in [0, 1]. The sum of weights of all colors from a single getDominantColors call is 1.0.