New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class SpreadThemableColor

Inheritance: objectSpreadThemableColor

Constructors

Initializes a new instance of the SpreadThemableColor class.

C#
public SpreadThemableColor(SpreadColor color, bool isAutomatic)
Parameters:colorSpreadColor

The color.

isAutomaticbool

The is automatic.

Initializes a new instance of the SpreadThemableColor class.

C#
public SpreadThemableColor(SpreadColor color)
Parameters:colorSpreadColor

The color.

Initializes a new instance of the SpreadThemableColor class.

C#
public SpreadThemableColor(SpreadThemeColorType themeColorType, double tintAndShade)
Parameters:themeColorTypeSpreadThemeColorType

Type of the theme color.

tintAndShadedouble

The tint and shade.

Initializes a new instance of the SpreadThemableColor class.

C#
public SpreadThemableColor(SpreadThemeColorType themeColorType, SpreadColorShadeType? colorShadeType)
Parameters:themeColorTypeSpreadThemeColorType

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.

C#
public SpreadThemableColor(SpreadThemeColorType themeColorType)
Parameters:themeColorTypeSpreadThemeColorType

Type of the theme color.

Properties

Predefined shade level applied to the theme color, if specified.

C#
public SpreadColorShadeType? ColorShadeType { get; }
Property Value:

The type of the color shade.

Indicates an automatic color whose final value may be chosen contextually by a consumer.

C#
public bool IsAutomatic { get; }
Property Value:

Value indicating if the color is automatic.

Indicates whether the color is derived from the workbook theme instead of a fixed RGB value.

C#
public bool IsFromTheme { get; }
Property Value:

The value indicating if the color comes from a theme.

Direct RGB color value when not theme-based; null if resolved from theme.

C#
public SpreadColor LocalValue { get; }
Property Value:

The local value of the color.

Theme color slot referenced when the color is theme-based.

C#
public SpreadThemeColorType ThemeColorType { get; }
Property Value:

The type of the theme color.

Numeric tint/shade adjustment (-1..1) applied to the theme color to compute the final color.

C#
public double? TintAndShade { get; }
Property Value:

The tint and shade value.

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

Returns true if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Creates a new instance of the SpreadThemableColor class.

C#
public static SpreadThemableColor FromRgb(byte red, byte green, byte blue)
Parameters:redbyte

The red component.

greenbyte

The green component.

bluebyte

The blue component.

Returns:

SpreadThemableColor

Instance of the SpreadThemableColor class.

C#
public static SpreadThemableColor FromSpreadColor(SpreadColor value)
Parameters:valueSpreadColor

The SpreadColor.

Returns:

SpreadThemableColor

The SpreadThemableColor.

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Returns a string that represents the themable color.

C#
public override string ToString()
Returns:

string

A string that represents the themable color.

Overrides: object.ToString()

Operators

Explicitly cast color to themable color.

C#
public static explicit operator SpreadThemableColor(SpreadColor value)
Parameters:valueSpreadColor

The color.

Returns:

SpreadThemableColor

Themable color.

Determines whether the specified themable colors are different.

C#
public static bool operator !=(SpreadThemableColor first, SpreadThemableColor second)
Parameters:firstSpreadThemableColorsecondSpreadThemableColorReturns:

bool

True if the themable colors are different; otherwise, false.

Determines whether the specified themable colors are equal.

C#
public static bool operator ==(SpreadThemableColor first, SpreadThemableColor second)
Parameters:firstSpreadThemableColorsecondSpreadThemableColorReturns:

bool

True if the themable colors are equal; otherwise, false.