Table of Contents

Struct DocColor

Namespace
DocWright.Dom
Assembly
DocWright.Dom.dll

A color value as written in the source: either a literal RGB value (including the special "auto"), or a theme slot reference with optional tint/shade transforms (ECMA-376 Part 1 §17.3.2.6 w:color and equivalents). The style resolver turns this into a concrete ColorRgb; a theme reference takes precedence over the literal value when both are present, matching Word.

public readonly struct DocColor : IEquatable<DocColor>
Implements
Inherited Members

Constructors

DocColor(ColorRgb)

Initializes a literal color with no theme reference.

DocColor(ColorRgb?, ThemeColorSlot?, byte?, byte?)

Initializes a color with an optional theme reference.

Properties

Rgb

Gets the literal color value as written, or null.

ThemeShade

Gets the shade transform byte (0 = full shade toward black, 255 = none), or null.

ThemeSlot

Gets the referenced theme slot, or null for a literal color.

ThemeTint

Gets the tint transform byte (0 = full tint toward white, 255 = none), or null.

Methods

Equals(DocColor)
Equals(object?)
GetHashCode()

Operators

operator ==(DocColor, DocColor)

Determines whether two colors are equal.

operator !=(DocColor, DocColor)

Determines whether two colors differ.