# SvgColorVariable

One colour mapped to a CSS custom property by SvgColorVariables.

 Struct  

`ChartForgeX.Themes`

**Namespace**

`ChartForgeX.Themes`

**Assembly**

`ChartForgeX`

**Source**

[SvgColorVariable.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorVariable.cs#L14)

**Base**

`ValueType`

**Modifiers**

sealed

One colour mapped to a CSS custom property by [SvgColorVariables](/api/chartforgex-themes-svgcolorvariables/).

## Inheritance

- ValueType
- SvgColorVariable

## Usage

 Explore 2 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 2

- Method [SvgColorVariables.GetVariablesForSvg](/api/chartforgex-themes-svgcolorvariables/#method-getvariablesforsvg-string)
- Property [SvgColorVariables.Variables](/api/chartforgex-themes-svgcolorvariables/#property-variables)

 Filter members   

    Show inherited   

 

## Inherited Methods

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

Inherited from ValueType

Parameters

**obj object? required**

Returns

 `bool` 

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

Inherited from ValueType

Returns

 `int` 

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

Inherited from object

Returns

 `Type` 

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

Inherited from ValueType

Returns

 `string?` 

## Properties

 `public string Name { get; }` [#](#property-name) 

[SvgColorVariable.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorVariable.cs#L14)

Gets the custom property name, for example --brand-series-1.

 `public ChartColor Color { get; }` [#](#property-color) 

[SvgColorVariable.cs:17](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorVariable.cs#L17)

Gets the colour the property stands for; its literal value is the fallback.

 `public SvgColorRole Role { get; }` [#](#property-role) 

[SvgColorVariable.cs:24](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Themes/SvgColorVariable.cs#L24)

Gets the role of the colour. Paints written for a role prefer variables of that role; [SvgColorRole.Surface](/api/chartforgex-themes-svgcolorrole/) variables are never used for the fill of text, so text that happens to have a surface colour (such as white labels on dark marks) stays literal instead of following the surface into another theme.

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