Main Content


Get color used to draw ROI object

getColor is not recommended. Using the new ROIs, retrieve the color of the ROI by accessing the value of Color property instead. For more information, see Compatibility Considerations.


color = getColor(h) gets the color used to draw the ROI object h.

Input Arguments

collapse all

ROI object, specified as an imellipse, imfreehand, imline, impoint, impoly, or imrect object.

Output Arguments

collapse all

RGB color value, returned as a 3-element numeric vector.

Compatibility Considerations

expand all

Not recommended starting in R2018b

Introduced before R2006a