MaterialColorPalette Class
Definition
Implements a reduced version of the 2014 Material Design color palette.
public class MaterialColorPalette
Remarks
This palette is based on the one outlined here:
https://material.io/design/color/the-color-system.html#tools-for-picking-colors
In order to make the palette uniform and rectangular the following alterations were made:
- The A100-A700 shades of each color are excluded. These shades do not exist for all colors (brown/gray).
- Black/White are stand-alone and are also excluded.
Constructors
| Name | Description |
|---|---|
| MaterialColorPalette | No summary available. |
MaterialColorPalette Constructor
public MaterialColorPalette()
Methods
| Name | Description |
|---|---|
| GetColor | Gets a color in the palette by index. |
GetColor Method
Gets a color in the palette by index.
public Avalonia.Media.Color GetColor(int colorIndex, int shadeIndex)
Parameters
colorIndex int
The index of the color in the palette. The index must be between zero and Avalonia.Controls.IColorPalette.ColorCount.
shadeIndex int
The index of the color shade in the palette. The index must be between zero and Avalonia.Controls.IColorPalette.ShadeCount.
Returns
The color at the specified index or an exception.
Properties
| Name | Description |
|---|---|
| ColorCount | Gets the total number of colors in this palette. A color is not necessarily a single value and may be composed of several shades. |
| ShadeCount | Gets the total number of shades for each color in this palette. Shades are usually a variation of the color lightening or darkening it. |
ColorCount Property
Gets the total number of colors in this palette. A color is not necessarily a single value and may be composed of several shades.
public int ColorCount { get; set; }
Remarks
Represents total columns in a table.
ShadeCount Property
Gets the total number of shades for each color in this palette. Shades are usually a variation of the color lightening or darkening it.
public int ShadeCount { get; set; }
Remarks
Represents total rows in a table.