ColorExtensions Class

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Helper class for working with colors.

public static class ColorExtensions
Inheritance:
System.Object → ColorExtensions

Methods

Alpha(Color, single) Sets the alpha channel value for the specified color.
Darken(Color, single) Lighten a color.
GenerateColors(Color, int) Generate matching colors based on the specified baseColor.
GetAdjacent(ColorName, int) Get the color adjacent to the specified color in the palette.
GetColors(Color) Helper method that returns an array of matching colors based on the specified color.
Lighten(Color, single) Lighten a color.
Mix(Color, Color, single) Mix two colors. Replicating the Mix function in SASS
ToArgbColor(HslaColor) Converts an HSL color value to RGB.
ToHex(Color) Returns a hex string representing the color.
ToHex(HslaColor) Returns a hex string representing the color.
ToHslaColor(Color) Converts an ARGB color to HSLA.
UseDarkText(Color) Returns a value indicating whether we should use dark text or not against the specified background color.