Class
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:

cs-api-definition
public class SpreadThemableColor

Inheritance: objectSpreadThemableColor

Constructors

SpreadThemableColor(SpreadColor)

Initializes a new instance of the SpreadThemableColor class.

Declaration

cs-api-definition
public SpreadThemableColor(SpreadColor color)

Parameters

color

SpreadColor

The color.

SpreadThemableColor(SpreadColor, bool)

Initializes a new instance of the SpreadThemableColor class.

Declaration

cs-api-definition
public SpreadThemableColor(SpreadColor color, bool isAutomatic)

Parameters

color

SpreadColor

The color.

isAutomatic

bool

The is automatic.

SpreadThemableColor(SpreadThemeColorType)

Initializes a new instance of the SpreadThemableColor class.

Declaration

cs-api-definition
public SpreadThemableColor(SpreadThemeColorType themeColorType)

Parameters

themeColorType

SpreadThemeColorType

Type of the theme color.

SpreadThemableColor(SpreadThemeColorType, SpreadColorShadeType?)

Initializes a new instance of the SpreadThemableColor class.

Declaration

cs-api-definition
public SpreadThemableColor(SpreadThemeColorType themeColorType, SpreadColorShadeType? colorShadeType)

Parameters

themeColorType

SpreadThemeColorType

Type of the theme color.

colorShadeType

SpreadColorShadeType?

Type of the predefined tint and shade proportion for the themable color.

SpreadThemableColor(SpreadThemeColorType, double)

Initializes a new instance of the SpreadThemableColor class.

Declaration

cs-api-definition
public SpreadThemableColor(SpreadThemeColorType themeColorType, double tintAndShade)

Parameters

themeColorType

SpreadThemeColorType

Type of the theme color.

tintAndShade

double

The tint and shade.

Properties

ColorShadeType

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

Declaration

cs-api-definition
public SpreadColorShadeType? ColorShadeType { get; }

Property Value

SpreadColorShadeType?

The type of the color shade.

IsAutomatic

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

Declaration

cs-api-definition
public bool IsAutomatic { get; }

Property Value

bool

Value indicating if the color is automatic.

IsFromTheme

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

Declaration

cs-api-definition
public bool IsFromTheme { get; }

Property Value

bool

The value indicating if the color comes from a theme.

LocalValue

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

Declaration

cs-api-definition
public SpreadColor LocalValue { get; }

Property Value

SpreadColor

The local value of the color.

ThemeColorType

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

Declaration

cs-api-definition
public SpreadThemeColorType ThemeColorType { get; }

Property Value

SpreadThemeColorType

The type of the theme color.

TintAndShade

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

Declaration

cs-api-definition
public double? TintAndShade { get; }

Property Value

double?

The tint and shade value.

Methods

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

FromRgb(byte, byte, byte)

Creates a new instance of the SpreadThemableColor class.

Declaration

cs-api-definition
public static SpreadThemableColor FromRgb(byte red, byte green, byte blue)

Parameters

red

byte

The red component.

green

byte

The green component.

blue

byte

The blue component.

Returns

SpreadThemableColor

Instance of the SpreadThemableColor class.

FromSpreadColor(SpreadColor)

Declaration

cs-api-definition
public static SpreadThemableColor FromSpreadColor(SpreadColor value)

Parameters

value

SpreadColor

The SpreadColor.

Returns

SpreadThemableColor

The SpreadThemableColor.

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

ToString()

Returns a string that represents the themable color.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the themable color.

Overrides object.ToString()

Operators

explicit operator SpreadThemableColor(SpreadColor)

Explicitly cast color to themable color.

Declaration

cs-api-definition
public static explicit operator SpreadThemableColor(SpreadColor value)

Parameters

value

SpreadColor

The color.

Returns

SpreadThemableColor

Themable color.

operator !=(SpreadThemableColor, SpreadThemableColor)

Determines whether the specified themable colors are different.

Declaration

cs-api-definition
public static bool operator !=(SpreadThemableColor first, SpreadThemableColor second)

Parameters

first

SpreadThemableColor

second

SpreadThemableColor

Returns

bool

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

operator ==(SpreadThemableColor, SpreadThemableColor)

Determines whether the specified themable colors are equal.

Declaration

cs-api-definition
public static bool operator ==(SpreadThemableColor first, SpreadThemableColor second)

Parameters

first

SpreadThemableColor

second

SpreadThemableColor

Returns

bool

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