ColorUtilities Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static class ColorUtilities
type ColorUtilities = class
Public Module ColorUtilities
- Inheritance
-
ColorUtilities
Methods
Blend(Color, Color) |
Computes the result of alpha-blending this color over the background using the algorithm described at https://en.wikipedia.org/wiki/Alpha_compositing. |
CompareContrastWithBlackAndWhite(Color) |
Calculates the contrast ratio of the specified color against both black and white and returns which one has better contrast ratio. |
GetBrushFromCache(Color) |
Get a brush that corresponds to a color. The brushes are stored in a cache. |
GetContrastRatio(Color, Color) |
Returns the contrast ratio between |
GetLuminance(Color) |
Gets the luminance of a color in sRGB colorspace according to https://www.w3.org/TR/WCAG20/#relativeluminancedef |