Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.54 KB

File metadata and controls

43 lines (27 loc) · 1.54 KB

ConsolePlus

ColorExtensions Class

Provides extension methods for Color.

public static class ColorExtensions

Inheritance System.Object → ColorExtensions

Methods

ColorExtensions.Weighted(this Color, int) Method

Gets a weighted variation of a CSS base color.

public static ConsolePlusLibrary.Color Weighted(this ConsolePlusLibrary.Color color, int weight);

Parameters

color Color

Base color instance (must map to a CSS named color).

weight System.Int32

Weight in the range 0-1000. The value is mapped to the nearest proportional weighted step. Values greater than or equal to 1000 return the original color.

Returns

Color
The weighted variation, or the original color if weight is out of range.