Name
set_colorset_colorSetColorset_colorSetColorSetColor — Set output color.
set_colorset_colorSetColorset_colorSetColorSetColor defines the colors for region output in the window. The
available colors can be queried with the operator query_colorquery_colorQueryColorquery_colorQueryColorQueryColor. In
addition, the ColorColorColorColorColorcolor may be specified as an RGB triplet in in the
form '#rrggbb'"#rrggbb""#rrggbb""#rrggbb""#rrggbb""#rrggbb", where 'rr', 'gg', and 'bb' are hexadecimal numbers
between '00' and 'ff', respectively.
The “colors” 'black' and 'white'
are available for all screens. If colors are used that are not
displayable on the screen, HALCON can choose a similar, displayable
color of the output. For this, set_check(::'~color':) must be called. Furthermore,
the list of available colors can be set with the operator
set_system(::'graphic_colors',...:)set_system("graphic_colors",...)SetSystem("graphic_colors",...)set_system("graphic_colors",...)SetSystem("graphic_colors",...)SetSystem("graphic_colors",...). That must be done
before opening the first output window. If only a single color is
passed, all output is in this color. If a tuple of colors is passed,
the output color of regions is modulo to the number of colors. In
the example below, the first circle is displayed red, the second in
green and the third in red again. HALCON always begins output with
the first color passed. Note, that the number of output colors
depends on the number of objects that are displayed in one operator
call. If only single objects are displayed, they always appear in
the first color, even if the consist of more than one connected
components.
The defined colors are used until set_colorset_colorSetColorset_colorSetColorSetColor,
set_pixelset_pixelSetPixelset_pixelSetPixelSetPixel, set_rgbset_rgbSetRgbset_rgbSetRgbSetRgb, set_hsiset_hsiSetHsiset_hsiSetHsiSetHsi or
set_grayset_graySetGrayset_graySetGraySetGray is called again.
Colors are defined separately for each window. They can only be
changed for the valid window.
ColorColorColorColorColorcolor is used in operators with region output like
disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion, disp_linedisp_lineDispLinedisp_lineDispLineDispLine,
disp_rectangle1disp_rectangle1DispRectangle1disp_rectangle1DispRectangle1DispRectangle1, disp_arrowdisp_arrowDispArrowdisp_arrowDispArrowDispArrow etc. It is also
used by operators with
gray value output in certain output modes (e.g. '3d_plot_lines','histogram',
'contourline', etc. See set_paintset_paintSetPaintset_paintSetPaintSetPaint).
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: local (may only be called from the same thread in which the window, model, or tool instance was created).
- Processed without parallelization.
Output color names.
Default value:
'white'
"white"
"white"
"white"
"white"
"white"
Suggested values: 'black'"black""black""black""black""black", 'white'"white""white""white""white""white", 'red'"red""red""red""red""red", 'green'"green""green""green""green""green", 'blue'"blue""blue""blue""blue""blue", 'cyan'"cyan""cyan""cyan""cyan""cyan", 'magenta'"magenta""magenta""magenta""magenta""magenta", 'yellow'"yellow""yellow""yellow""yellow""yellow", 'dim gray'"dim gray""dim gray""dim gray""dim gray""dim gray", 'gray'"gray""gray""gray""gray""gray", 'light gray'"light gray""light gray""light gray""light gray""light gray", 'medium slate blue'"medium slate blue""medium slate blue""medium slate blue""medium slate blue""medium slate blue", 'coral'"coral""coral""coral""coral""coral", 'slate blue'"slate blue""slate blue""slate blue""slate blue""slate blue", 'spring green'"spring green""spring green""spring green""spring green""spring green", 'orange red'"orange red""orange red""orange red""orange red""orange red", 'orange'"orange""orange""orange""orange""orange", 'dark olive green'"dark olive green""dark olive green""dark olive green""dark olive green""dark olive green", 'pink'"pink""pink""pink""pink""pink", 'cadet blue'"cadet blue""cadet blue""cadet blue""cadet blue""cadet blue", '#003075'"#003075""#003075""#003075""#003075""#003075", '#e53019'"#e53019""#e53019""#e53019""#e53019""#e53019", '#ffb529'"#ffb529""#ffb529""#ffb529""#ffb529""#ffb529"
set_color(WindowHandle,['red','green'])
disp_circle(WindowHandle,[100,200,300],[200,300,100],[100,100,100])
Htuple Colors, WindowHandleTuple ;
create_tuple(Colors,2) ;
set_s(Colors,"red",0) ;
set_s(Colors,"green",1) ;
create_tuple(&WindowHandleTuple,1) ;
set_i(WindowHandleTuple, WindowHandle,0) ;
T_set_color(WindowHandleTuple,Colors) ;
disp_circle(WindowHandle,(double)100.0,(double)200.0,(double)100.0) ;
disp_circle(WindowHandle,(double)200.0,(double)300.0,(double)100.0) ;
disp_circle(WindowHandle,(double)300.0,(double)100.0,(double)100.0) ;
set_color(WindowHandle,['red','green'])
disp_circle(WindowHandle,[100,200,300],[200,300,100],[100,100,100])
set_color(WindowHandle,['red','green'])
disp_circle(WindowHandle,[100,200,300],[200,300,100],[100,100,100])
set_color(WindowHandle,['red','green'])
disp_circle(WindowHandle,[100,200,300],[200,300,100],[100,100,100])
set_color(WindowHandle,['red','green'])
disp_circle(WindowHandle,[100,200,300],[200,300,100],[100,100,100])
set_colorset_colorSetColorset_colorSetColorSetColor returns 2 (H_MSG_TRUE) if the window is valid and the
passed colors are displayable on the screen. Otherwise an exception
is raised.
query_colorquery_colorQueryColorquery_colorQueryColorQueryColor
disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion
set_rgbset_rgbSetRgbset_rgbSetRgbSetRgb,
set_hsiset_hsiSetHsiset_hsiSetHsiSetHsi
get_rgbget_rgbGetRgbget_rgbGetRgbGetRgb,
disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion,
set_fixset_fixSetFixset_fixSetFixSetFix,
set_paintset_paintSetPaintset_paintSetPaintSetPaint
Foundation