In This Article

ColorPalette Class

Stores information about a palette that consists of multiple color ramps.

public class ColorPalette
Inheritance:
object object

Constructors

ColorPalette(ThemeDefinition)

Initializes an instance of the class.

public ColorPalette(ThemeDefinition definition)
Parameter Type Description
definition ThemeDefinition

The ThemeDefinition to examine.

Properties

All

The collection of all color ramps in the palette.

public IEnumerable<IColorRamp> All { get; }

Property Value

IEnumerable<IColorRamp>

Blue

The blue color ramp.

public IColorRamp Blue { get; }

Property Value

IColorRamp

Gray

The gray color ramp.

public IColorRamp Gray { get; }

Property Value

IColorRamp

Green

The green color ramp.

public IColorRamp Green { get; }

Property Value

IColorRamp

Indigo

The indigo color ramp.

public IColorRamp Indigo { get; }

Property Value

IColorRamp

Orange

The orange color ramp.

public IColorRamp Orange { get; }

Property Value

IColorRamp

Pink

The pink color ramp.

public IColorRamp Pink { get; }

Property Value

IColorRamp

Purple

The purple color ramp.

public IColorRamp Purple { get; }

Property Value

IColorRamp

Red

The red color ramp.

public IColorRamp Red { get; }

Property Value

IColorRamp

Silver

The silver color ramp.

public IColorRamp Silver { get; }

Property Value

IColorRamp

Teal

The teal color ramp.

public IColorRamp Teal { get; }

Property Value

IColorRamp

Yellow

The yellow color ramp.

public IColorRamp Yellow { get; }

Property Value

IColorRamp

Methods

GetBaseColorForBrandColor(ThemeIntent, Color)

Researches the color family base Color that will generate a Color closest to the specified brand/accent color.

public static Color GetBaseColorForBrandColor(ThemeIntent intent, Color brandColor)
Parameter Type Description
intent ThemeIntent

The theme indent.

brandColor Color

The brand/accent Color.

Returns

Color:

The color family base Color that was found.

GetColorRamp(ColorFamilyName)

Returns the IColorRamp for the specified color family.

public IColorRamp? GetColorRamp(ColorFamilyName familyName)
Parameter Type Description
familyName ColorFamilyName

A ColorFamilyName indicating the color family.

Returns

IColorRamp

Inherited Members

Extension Methods