skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ThemableColor

Color value that can originate from a theme or a local override and be resolved to an actual color.

Inheritance
System.Object
ThemableColor
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Core.dll

Syntax

public class ThemableColor : IThemableObject<Color>

Constructors

ThemableColor(Color)

Initializes a new instance of the ThemableColor class with a concrete color value.

Declaration
public ThemableColor(Color color)
Parameters
System.Windows.Media.Color color

The color.

ThemableColor(Color, Boolean)

Initializes a new instance of the ThemableColor class with a concrete color and an automatic flag.

Declaration
public ThemableColor(Color color, bool isAutomatic)
Parameters
System.Windows.Media.Color color

The color.

System.Boolean isAutomatic

The is automatic.

ThemableColor(ThemeColorType, Double)

Initializes a new instance that references a theme color with a tint/shade adjustment in [-1, 1].

Declaration
public ThemableColor(ThemeColorType themeColorType, double tintAndShade)
Parameters
ThemeColorType themeColorType

Theme color type.

System.Double tintAndShade

The tint and shade.

ThemableColor(ThemeColorType, Nullable<ColorShadeType>)

Initializes a new instance that references a theme color and optional shade step.

Declaration
public ThemableColor(ThemeColorType themeColorType, ColorShadeType? colorShadeType = default(ColorShadeType? ))
Parameters
ThemeColorType themeColorType

The theme color type.

System.Nullable<ColorShadeType> colorShadeType

The color shade type.

Properties

ColorShadeType

Gets the shade step used to derive a lighter/darker variant when the color references a theme.

Declaration
public ColorShadeType? ColorShadeType { get; }
Property Value
System.Nullable<ColorShadeType>

The color shade type.

IsAutomatic

Gets whether the color is marked as automatic, allowing consumers to adjust it as appropriate.

Declaration
public bool IsAutomatic { get; }
Property Value
System.Boolean

Value indicating if the color is automatic.

IsFromTheme

Gets whether the color is resolved from the theme rather than a local color.

Declaration
public bool IsFromTheme { get; }
Property Value
System.Boolean

The value indicating if the instance is from a theme.

Implements
IThemableObject<T>.IsFromTheme

LocalValue

Gets the locally assigned color used when the value does not come from the theme.

Declaration
public Color LocalValue { get; }
Property Value
System.Windows.Media.Color

Implements
IThemableObject<T>.LocalValue

ThemeColorType

Gets the referenced theme color type when the value comes from the theme.

Declaration
public ThemeColorType ThemeColorType { get; }
Property Value
ThemeColorType

The theme color type.

TintAndShade

Gets the tint/shade adjustment in the range [-1, 1] when explicitly specified.

Declaration
public double? TintAndShade { get; }
Property Value
System.Nullable<System.Double>

The tint and shade.

Methods

Equals(Object)

Determines whether the specified System.Object is equal to the current System.Object.

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

The System.Object to compare with the current System.Object.

Returns
System.Boolean

True if the specified System.Object is equal to the current System.Object; otherwise, false.

Overrides
System.Object.Equals(System.Object)

FromArgb(Byte, Byte, Byte, Byte)

Create a themable color from ARGB components.

Declaration
public static ThemableColor FromArgb(byte alfa, byte red, byte green, byte blue)
Parameters
System.Byte alfa

The alfa 0 to 255.

System.Byte red

The red 0 to 255.

System.Byte green

The green 0 to 255.

System.Byte blue

The blue 0 to 255.

Returns
ThemableColor

FromColor(Color)

Convert a System.Windows.Media.Color to a ThemableColor.

Declaration
public static ThemableColor FromColor(Color value)
Parameters
System.Windows.Media.Color value

The System.Windows.Media.Color.

Returns
ThemableColor

The ThemableColor.

GetActualValue(DocumentTheme)

Resolve the effective color using the specified theme.

Declaration
public Color GetActualValue(DocumentTheme theme)
Parameters
DocumentTheme theme

The theme.

Returns
System.Windows.Media.Color

The actual value.

Implements
IThemableObject<T>.GetActualValue(DocumentTheme)

GetActualValue(ThemeColorScheme)

Resolve the effective color using the provided color scheme.

Declaration
public Color GetActualValue(ThemeColorScheme colorScheme)
Parameters
ThemeColorScheme colorScheme

The color scheme.

Returns
System.Windows.Media.Color

The actual color.

GetHashCode()

Serves as a hash function for a particular type.

Declaration
public override int GetHashCode()
Returns
System.Int32

A hash code for the current System.Object.

Overrides
System.Object.GetHashCode()

ToString()

Returns a System.String that represents the current System.Object.

Declaration
public override string ToString()
Returns
System.String

A System.String that represents the current System.Object.

Overrides
System.Object.ToString()

Operators

Equality(ThemableColor, ThemableColor)

Compare two themable colors for value equality.

Declaration
public static bool operator ==(ThemableColor first, ThemableColor second)
Parameters
ThemableColor first

The first themable color.

ThemableColor second

The second themable color.

Returns
System.Boolean

If the two themable colors are equal.

Explicit(Color to ThemableColor)

Explicitly cast a concrete color to a themable color instance.

Declaration
public static explicit operator ThemableColor(Color value)
Parameters
System.Windows.Media.Color value

The color.

Returns
ThemableColor

Themable color.

Inequality(ThemableColor, ThemableColor)

Compare two themable colors for inequality.

Declaration
public static bool operator !=(ThemableColor first, ThemableColor second)
Parameters
ThemableColor first

The first themable color.

ThemableColor second

The second themable color.

Returns
System.Boolean

If the two themable colors are equal.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.