VegaRise.NET
Back to DOM

ColorSchemeClass

Definition

Namespace
DOM.Elements.Graphics.Colors
Assembly
DOM.dll

Represents a color scheme that groups all the named color slots used by a document theme.

Remarks

pairs the twelve standard Office theme color slots (background1/2, text1/2, accent1–6, hyperlink, followed hyperlink) with their string color values, plus optional additional slots. It is attached to a through its property. ColorScheme Theme Colors Values are stored as strings so they can hold hex codes, named colors, or theme-relative references, matching the underlying Office Open XML representation.

Examples

csharp
1// 1. Configure a minimal palette
2var scheme = new ColorScheme
3{
4 Background1 = "#FFFFFF",
5 Text1 = "#000000"
6};
7
csharp
1// 2. Configure a corporate palette with six accents
2var scheme = new ColorScheme
3{
4 Accent1 = "#1E88E5",
5 Accent2 = "#43A047",
6 Accent3 = "#FB8C00",
7 Accent4 = "#8E24AA",
8 Accent5 = "#00ACC1",
9 Accent6 = "#C62828"
10};
11
csharp
1// 3. Hyperlink slots
2scheme.Hyperlink = "#0563C1";
3scheme.FollowedHyperlink = "#954F72";
4
csharp
1// 4. Attach to a theme
2var theme = new Theme { Name = "Brand", Colors = scheme };
3
csharp
1// 5. Default light/dark backgrounds
2scheme.Background1 = "#FFFFFF";
3scheme.Background2 = "#EEEEEE";
4scheme.Text1 = "#000000";
5scheme.Text2 = "#333333";
6

Properties

Accent1

Gets or sets the first accent color slot.

Accent2

Gets or sets the second accent color slot.

Accent3

Gets or sets the third accent color slot.

Accent4

Gets or sets the fourth accent color slot.

Accent5

Gets or sets the fifth accent color slot.

Accent6

Gets or sets the sixth accent color slot.

Background1

Gets or sets the first background color slot.

Background2

Gets or sets the second background color slot.

Dark1

Gets or sets the first dark color slot.

Dark2

Gets or sets the second dark color slot.

FollowedHyperlink

Gets or sets the followed hyperlink color slot.

Hyperlink

Gets or sets the hyperlink color slot.

Light1

Gets or sets the first light color slot.

Light2

Gets or sets the second light color slot.

PhColor

Gets or sets a placeholder color slot.

Text1

Gets or sets the first text color slot.

Text2

Gets or sets the second text color slot.

VegaRiseVDocs.NET

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in