API Reference
Class
ThemeUtilities
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
- Semantic color name.
- mode HtmlForgeX.Email.ThemeMode
- Theme mode to resolve against.
Returns
The cached color value.
public static String GetEffectiveColor(Theme theme, String currentColor, String semanticName) #Returns:
StringResolves the effective color for a component, returning the theme color when the current color matches the default palette value.
Parameters
- theme HtmlForgeX.Email.Theme
- currentColor System.String
- semanticName System.String
public static String GetThemedColor(Theme theme, String lightColor, String darkColor) #Returns:
StringResolves light or dark color based on the theme's current mode.
Parameters
- theme HtmlForgeX.Email.Theme
- The theme instance.
- lightColor System.String
- Color used when theme is light.
- darkColor System.String
- Color used when theme is dark.
Inherited Methods
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.