covert qcolor to Quantity_NameOfColor

Is there a way to convert (Qt) qcolor to Quantity_NameOfColor ? does anyone know a way?

Thanks,
Venu

Tilman Leune's picture

You could create a Quantity_Color-Object using the RGB or HSV Values of your QColor, then use the .Name()-Method of the resulting Object.
Name() actually returns the NameOfColor which is closest to the Quantity_Color specified.

Venugopal Gudimetla's picture

Thanks Tilman, will try that.