New to KendoReact? Start a free 30-day trial
resolveElementColor
resolveElementColorPremium
Updated on Apr 15, 2026
Resolves the color of the specified CSS property of an element to an RGB color string.
Supports standard CSS color formats and relative color functions (e.g., oklch()) by leveraging the browser's CSS parsing capabilities.
Parameters
element
Element
The DOM element whose color is to be resolved.
colorProp
string
The CSS property name (e.g., 'color', 'backgroundColor') whose color is to be resolved.
Returns
string
The resolved hex color string (e.g., '#ff0000' or '#ff0000aa').