# SvgColorRole

The role of a colour variable in SvgColorVariables.

 Enum  

`ChartForgeX.Themes`

**Namespace**

`ChartForgeX.Themes`

**Assembly**

`ChartForgeX`

**Source**

[SvgColorRole.cs:8](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L8)

**Base**

`Enum`

**Implements**

 `IComparable` `ISpanFormattable` `IFormattable` `IConvertible` 

**Modifiers**

sealed

The role of a colour variable in [SvgColorVariables](/api/chartforgex-themes-svgcolorvariables/). When two variables share a colour, a paint written for a role (a series bar, a status mark, a ramp step, the surface behind marks) takes the variable of that role, so the property names the same token in every theme. Paints without a role match by colour alone.

## Inheritance

- Enum
- SvgColorRole

## Usage

 Explore 13 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 11

- Field [SvgColorRole.Any](/api/chartforgex-themes-svgcolorrole/#field-any)
- Field [SvgColorRole.Axis](/api/chartforgex-themes-svgcolorrole/#field-axis)
- Field [SvgColorRole.DivergingRamp](/api/chartforgex-themes-svgcolorrole/#field-divergingramp)
- Field [SvgColorRole.Grid](/api/chartforgex-themes-svgcolorrole/#field-grid)
- Field [SvgColorRole.Ramp](/api/chartforgex-themes-svgcolorrole/#field-ramp)
- Field [SvgColorRole.SequentialRamp](/api/chartforgex-themes-svgcolorrole/#field-sequentialramp)
- Field [SvgColorRole.Series](/api/chartforgex-themes-svgcolorrole/#field-series)
- Field [SvgColorRole.Status](/api/chartforgex-themes-svgcolorrole/#field-status)
- Field [SvgColorRole.Surface](/api/chartforgex-themes-svgcolorrole/#field-surface)
- Field [SvgColorRole.Text](/api/chartforgex-themes-svgcolorrole/#field-text)
- Property [SvgColorVariable.Role](/api/chartforgex-themes-svgcolorvariable/#property-role)

### Accepted by parameters 2

- Method [SvgColorVariables.Add](/api/chartforgex-themes-svgcolorvariables/#method-add-string-chartforgex-primitives-chartcolor-chartforgex-themes-svgcolorrole) parameter `role`
- Method [SvgColorVariables.AddInk](/api/chartforgex-themes-svgcolorvariables/#method-addink-string-chartforgex-primitives-chartcolor-chartforgex-primitives-chartcolor-chartforgex-themes-svgcolorrole) parameter `fillRole`

 Filter members   

    Show inherited   

 

## Inherited Methods

 `public int CompareTo(object? target)` [#](#method-compareto-object) 

Inherited from Enum

Parameters

**target object? required**

Returns

 `int` 

 `public override bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from Enum

Parameters

**obj object? required**

Returns

 `bool` 

 `public override int GetHashCode()` [#](#method-gethashcode) 

Inherited from Enum

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public TypeCode GetTypeCode()` [#](#method-gettypecode) 

Inherited from Enum

Returns

 `TypeCode` 

 `public bool HasFlag(Enum flag)` [#](#method-hasflag-enum) 

Inherited from Enum

Parameters

**flag Enum required**

Returns

 `bool` 

 ToString 4 overloads 

 `public override string ToString()` [#](#method-tostring) 

Inherited from Enum

Returns

 `string` 

 `public string ToString(string? format)` [#](#method-tostring-string) 

Inherited from Enum

Parameters

**format string? required**

Returns

 `string` 

 `public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider) 

Inherited from Enum

 `Obsolete("The provider argument is not used. Use ToString() instead.")` 

Parameters

**provider IFormatProvider? required**

Returns

 `string` 

 `public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider) 

Inherited from Enum

 `Obsolete("The provider argument is not used. Use ToString(String) instead.")` 

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

 `string` 

## Values

 `public const SvgColorRole Any` [#](#field-any) 

[SvgColorRole.cs:10](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L10)

No particular role: the variable is used for any paint of its colour.

Value: `0`

 `public const SvgColorRole Surface` [#](#field-surface) 

[SvgColorRole.cs:16](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L16)

A surface: page, card, plot, or line colour. Text matched by colour value never takes it; text a renderer writes in the surface colour on purpose (a count on a strong heatmap cell) does.

Value: `1`

 `public const SvgColorRole Text` [#](#field-text) 

[SvgColorRole.cs:19](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L19)

A text colour.

Value: `2`

 `public const SvgColorRole Series` [#](#field-series) 

[SvgColorRole.cs:22](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L22)

A categorical series colour.

Value: `3`

 `public const SvgColorRole Status` [#](#field-status) 

[SvgColorRole.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L25)

A severity, outcome, or operational-state colour.

Value: `4`

 `public const SvgColorRole Ramp` [#](#field-ramp) 

[SvgColorRole.cs:28](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L28)

A step of a sequential or diverging ramp.

Value: `5`

 `public const SvgColorRole Grid` [#](#field-grid) 

[SvgColorRole.cs:30](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L30)

A horizontal plot guide, distinct from neutral fills and ramp colours.

Value: `6`

 `public const SvgColorRole Axis` [#](#field-axis) 

[SvgColorRole.cs:32](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L32)

A baseline or crosshair colour.

Value: `7`

 `public const SvgColorRole SequentialRamp` [#](#field-sequentialramp) 

[SvgColorRole.cs:34](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L34)

A step of the theme's automatic sequential ramp.

Value: `8`

 `public const SvgColorRole DivergingRamp` [#](#field-divergingramp) 

[SvgColorRole.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorRole.cs#L36)

A step of a theme-derived diverging scale, distinct from equal sequential colors.

Value: `9`

<!-- PowerForge markdown artifact sha256:A6DE7BBA4879B9812895CB5D995A7FCF426CC2415CEA86373B4F6E10C71CA5C8 -->
