NXOpen.UF.Disp.AskClosestColor

Disp.AskClosestColor()

Refer to UF_DISP_ask_closest_color for documentation.

Signature: AskClosestColor(clrModel, clrValues, clrCmpMtd)

Parameters:
  • clrModel (int) – The color model of the values in clr_values; the following constants are defined in uf_disp.h: UF_DISP_rgb_model UF_DISP_hsv_model UF_DISP_hls_model
  • clrValues (list of float) – Three doubles representing the color, where the meaning and range of each value depends on the color model specified: rgb: clr_values[0]: 0.0
  • clrCmpMtd (int) – The Color Comparison Method currently only UF_DISP_CCM_EUCLIDEAN_DISTANCE is defined.
Returns:

The number of the closest color. Range: 1 .. (# color records in CTO) - 1 Note: the background color is not considered as a candidate.

Return type:

int

License requirements: None