@microsoft/fast-colors > calculateOverlayColor
calculateOverlayColor() function
Calculate an overlay color that uses rgba (rgb + alpha) that matches the appearance of a given solid color when placed on the same background
Signature:export declare function calculateOverlayColor(rgbMatch: ColorRGBA64, rgbBackground: ColorRGBA64, rgbOverlay?: ColorRGBA64): ColorRGBA64;
Parameters
Parameter | Type | Description |
---|---|---|
rgbMatch | ColorRGBA64 | The solid color the overlay should match in appearance when placed over the rgbBackground |
rgbBackground | ColorRGBA64 | The background on which the overlay rests |
rgbOverlay | ColorRGBA64 | The rgb color of the overlay. Typically this is either pure white or pure black and when not provided will be determined automatically. This color will be used in the returned output |
The rgba (rgb + alpha) color of the overlay