Technical Reference > Graphics Builder Automation Interface > Object Drawing and Property Functions > AttributeFillColour


Sets the fill color for an object, or retrieves a value representing the current fill color.

This function applies to the selected object, which is typically the last placed object. By using the PageSelectFirstObject() and PageSelectNextObject() functions, you can access your objects and change or read their properties.

Note: As this function does not support True Color functionality, it has been superseded by the functions AttributeFillOffColourEx and AttributeFillOnColourEx.




A value between 0 and 255 representing the fill color.

Return Value

If retrieving the current fill color, a value between 0 and 255. If applying a fill color, 0 (zero) if successful. In both cases, an error is returned if unsuccessful. If values are out of range on writing to the attribute, the function will exit and report the error E_INVALIDARG. If there is no active object, they will exit and report a return value of E_HANDLE.

Note: For details on handling return and error values, see Error Handling.

Related Functions



' Sets the fill color for an object
GraphicsBuilder.AttributeFillColour = 125

' Retrieves the value of the fill color
MyVariable = GraphicsBuilder.AttributeFillColour

Note: This function is implemented in the C++ environment as two separate functions: put_AttributeFillColour applies a fill color, and get_AttributeFillColour retrieves the current fill color setting.