Search Docs
Loading...
Skip to content

Interface: DominantColor

A single color extracted from the rendered appearance of a block.

Properties#

PropertyTypeDescription
rnumberRed component in sRGB, normalized to the range [0, 1].
gnumberGreen component in sRGB, normalized to the range [0, 1].
bnumberBlue component in sRGB, normalized to the range [0, 1].
weightnumberShare of analyzed pixels represented by this color, in the range [0, 1]. Higher values indicate a more prominent color. The sum of weights returned by a single BlockAPI.getDominantColors call is 1.0.