updating oE colors_to_attr


include console.e 
namespace console 
public function colors_to_attr(object fgbg, integer bg = 0) 

converts a foreground and background color set to its attribute code format.

  1. fgbg : Either a sequence of {fgcolor, bgcolor} or just an integer fgcolor.
  2. bg : An integer bgcolor. Only used when fgbg is an integer.

An integer, an attribute code.

Example 1:
? colors_to_attr({12, 5}) --> 92 
? colors_to_attr(12, 5) --> 92 
See Also:

get_screen_char, put_screen_char, attr_to_colors

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu