HtmlForgeX

API Reference

Class

ThemeUtilities

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers static

Helper methods for theme-aware color selection.

Inheritance

  • Object
  • ThemeUtilities

Methods

GetCachedColor(System.String name, HtmlForgeX.Email.ThemeMode mode) #

Retrieves a cached default color for the specified semantic name and theme mode.

Parameters

name System.String required
Semantic color name.
mode HtmlForgeX.Email.ThemeMode required
Theme mode to resolve against.

Returns

The cached color value.

public static String GetEffectiveColor(Theme theme, String currentColor, String semanticName) #
Returns: String

Resolves the effective color for a component, returning the theme color when the current color matches the default palette value.

Parameters

theme HtmlForgeX.Email.Theme requiredposition: 0
currentColor System.String requiredposition: 1
semanticName System.String requiredposition: 2
public static String GetThemedColor(Theme theme, String lightColor, String darkColor) #
Returns: String

Resolves light or dark color based on the theme's current mode.

Parameters

theme HtmlForgeX.Email.Theme requiredposition: 0
The theme instance.
lightColor System.String requiredposition: 1
Color used when theme is light.
darkColor System.String requiredposition: 2
Color used when theme is dark.

Properties

public static Theme Default { get; } #

Default theme instance used when no specific theme is provided.

Fields

_cache #

Cache for default palette lookups keyed by semantic color name and theme mode.