In This Article

IColorRampShade Interface

Provides the base requirements for a shade in a color ramp.

public interface IColorRampShade

Properties

Brightness

Gets the shade's brightness, in the range 0 to 1.

double Brightness { get; }

Property Value

double:

The shade's brightness.

Color

Gets the shade's color value.

Color Color { get; }

Property Value

Color:

The shade's color value.

ContrastName

Gets the shade's contrast name relative to the core theme intent (dark/light), if it has a known name.

string ContrastName { get; }

Property Value

string:

The shade's contrast name relative to the core theme intent (dark/light), if it has a known name.

ForegroundColor

Gets the shade's foreground color value.

Color ForegroundColor { get; }

Property Value

Color:

The shade's foreground color value.

IsLight

Gets whether this shade is a light color.

bool IsLight { get; }

Property Value

bool:

true if this shade is a light color; otherwise, false.

Name

Gets the shade's name, if it has a known name.

string Name { get; }

Property Value

string:

The shade's name, if it has a known name.

Number

Gets the shade's number (0..1000) within its parent color ramp.

int Number { get; }

Property Value

int:

The shade's number (0..1000) within its parent color ramp.

Ramp

Gets the parent IColorRamp of the shade.

IColorRamp Ramp { get; }

Property Value

IColorRamp:

The parent IColorRamp of the shade.

Methods

GetForegroundColor(double)

Returns the foreground color for the Color, given a specified contrast percentage.

Color GetForegroundColor(double contrastPercentage)
Parameter Type Description
contrastPercentage double

A contrast percentage. Valid values are 0 to 1.

Returns

Color:

The foreground color for the Color, given a specified contrast percentage.