SpreadThemableColor
Color value that may be a direct RGB color or a theme slot with optional shade/tint or automatic semantics.
Definition
Namespace:Telerik.Documents.SpreadsheetStreaming
Assembly:Telerik.Documents.SpreadsheetStreaming.dll
Syntax:
public class SpreadThemableColor
Inheritance: objectSpreadThemableColor
Constructors
Initializes a new instance of the SpreadThemableColor class.
public SpreadThemableColor(SpreadColor color, bool isAutomatic)
The color.
isAutomaticboolThe is automatic.
Initializes a new instance of the SpreadThemableColor class.
Initializes a new instance of the SpreadThemableColor class.
public SpreadThemableColor(SpreadThemeColorType themeColorType, double tintAndShade)
Type of the theme color.
tintAndShadedoubleThe tint and shade.
Initializes a new instance of the SpreadThemableColor class.
public SpreadThemableColor(SpreadThemeColorType themeColorType, SpreadColorShadeType? colorShadeType)
Type of the theme color.
colorShadeTypeSpreadColorShadeType?Type of the predefined tint and shade proportion for the themable color.
Initializes a new instance of the SpreadThemableColor class.
public SpreadThemableColor(SpreadThemeColorType themeColorType)
Type of the theme color.
Properties
Predefined shade level applied to the theme color, if specified.
public SpreadColorShadeType? ColorShadeType { get; }
The type of the color shade.
Indicates an automatic color whose final value may be chosen contextually by a consumer.
public bool IsAutomatic { get; }
Value indicating if the color is automatic.
Indicates whether the color is derived from the workbook theme instead of a fixed RGB value.
public bool IsFromTheme { get; }
The value indicating if the color comes from a theme.
Direct RGB color value when not theme-based; null if resolved from theme.
public SpreadColor LocalValue { get; }
The local value of the color.
Theme color slot referenced when the color is theme-based.
public SpreadThemeColorType ThemeColorType { get; }
The type of the theme color.
Numeric tint/shade adjustment (-1..1) applied to the theme color to compute the final color.
public double? TintAndShade { get; }
The tint and shade value.
Methods
Creates a new instance of the SpreadThemableColor class.
public static SpreadThemableColor FromRgb(byte red, byte green, byte blue)
The red component.
greenbyteThe green component.
bluebyteThe blue component.
Returns:Instance of the SpreadThemableColor class.
Converts SpreadColor to SpreadThemableColor.
public static SpreadThemableColor FromSpreadColor(SpreadColor value)
The SpreadColor.
Returns:The SpreadThemableColor.
Returns a string that represents the themable color.
public override string ToString()
A string that represents the themable color.
Overrides:
Operators
Explicitly cast color to themable color.
public static explicit operator SpreadThemableColor(SpreadColor value)
The color.
Returns:Themable color.
Determines whether the specified themable colors are different.
public static bool operator !=(SpreadThemableColor first, SpreadThemableColor second)
True if the themable colors are different; otherwise, false.
Determines whether the specified themable colors are equal.
public static bool operator ==(SpreadThemableColor first, SpreadThemableColor second)
True if the themable colors are equal; otherwise, false.