@microsoft/fast-colors > PixelBox
PixelBox class
Represents a range of colors in RGB color space.
Signature:export declare class PixelBox
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(globalHistogram, minRed, maxRed, minGreen, maxGreen, minBlue, maxBlue) | Constructs a new instance of the PixelBox class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
averageColor | ColorRGBA64 | ||
colorVolume | number | ||
globalHistogram | Histogram | ||
maxBlue | number | ||
maxGreen | number | ||
maxRed | number | ||
minBlue | number | ||
minGreen | number | ||
minRed | number | ||
modifiedMedianCut | () => [PixelBox | null, PixelBox | null] | Attempts to divide the range of colors represented by this PixelBox into two smaller PixelBox objects. This does not actually cut directly at the median, rather it finds the median then cuts halfway through the larger box on either side of that median. The result is that small areas of color are better represented in the final output. Based on the Modified Median Cut Quantization implementation from https://github.com/DanBloomberg/leptonica/blob/master/src/colorquant2.c | |
pixelCount | number | ||
rangeBlue | number | ||
rangeGreen | number | ||
rangeRed | number |