Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Using Colors ====== The [[addtable_set_printer_message|ADDTABLE]], [[fillstyle_set_printer_message|FILLSTYLE]], [[font_set_printer_message|FONT]], [[fontheadfoot_set_printer_message|FONTHEADFOOT]], and [[linestyle_set_printer_message|LINESTYLE]] messages have a color parameter. This color parameter must contain a valid COLORREF value, which is passed to the printer engine. The formula for calculating a COLORREF is: <code> color = 0 color += red color += green * 256 color += blue * 65536 </code> Where red is the red value from 0 to 255, green is the green value from 0 to 255, and blue is the blue value from 0 to 255. Black is equal to 0 and white is equal to 16843008. The setup program for the OIPI installed a function called [[rgb|RGB()]] that can be called from a Basic+ program to perform the conversion to the COLORREF format. There are three parameters for the [[rgb|RGB()]] function: red, green, and blue. These parameters must have values between 0 and 255. The value for each color specifies how much of each color component is contained in the COLORREF. Another method of obtaining a valid COLORREF is to use the Basic+ [[utility|UTILITY()]] function. The common dialog box for Colors can be displayed with the first parameter of UTILITY set to [[choosecolor_service|CHOOSECOLOR.]] The [[oiprint_equates|OIPRINT_EQUATES]] $INSERT record contains constants for common color codes. \\ guides/programming/programmers_reference_manual/using_colors.txt Last modified: 2024/06/19 20:20by 127.0.0.1