Retrieves the current color value of the control.
This method returns the current color value of the control as a string in a valid CSS color format (e.g., HEX, RGB, etc.). If the control does not have a color value, it returns an empty string.
// Get the control by its element GUID and retrieve the color value
const colorValue = ix.api.dom.getControl("<ELEMENT-GUID>").getValue();
console.log(colorValue); // Outputs the color value to the console
Sets the color value of the control.
This method allows you to programmatically set the color value of the control. The color value should be provided as a string in a valid CSS color format (e.g., HEX, RGB, etc.).
The color value set by this method will not persist across sessions. It is only visible in the current session.
// Get the control by its element GUID and set the color value to white
ix.api.dom.getControl("<ELEMENT-GUID>").setValue("#ffffff");
Represents a view control for color values.
This control is used to display color values in a user-friendly manner. It can handle various color formats (e.g., RGB, HEX, etc.) and presents them in a visually intuitive way. This makes it easier for users to understand and interpret the color data being displayed.