25 #ifndef CHARACTERCOLOR_H
26 #define CHARACTERCOLOR_H
92 #define BASE_COLORS (2+8)
94 #define TABLE_COLORS (INTENSITIES*BASE_COLORS)
96 #define DEFAULT_FORE_COLOR 0
97 #define DEFAULT_BACK_COLOR 1
105 ColorEntry(QColor(0x00,0x00,0x00), 1, 0 ),
ColorEntry( QColor(0xFF,0xFF,0xFF), 0, 0 ),
106 ColorEntry(QColor(0x00,0x00,0x00), 0, 0 ),
ColorEntry( QColor(0xB2,0x18,0x18), 0, 0 ),
107 ColorEntry(QColor(0x18,0xB2,0x18), 0, 0 ),
ColorEntry( QColor(0xB2,0x68,0x18), 0, 0 ),
108 ColorEntry(QColor(0x18,0x18,0xB2), 0, 0 ),
ColorEntry( QColor(0xB2,0x18,0xB2), 0, 0 ),
109 ColorEntry(QColor(0x18,0xB2,0xB2), 0, 0 ),
ColorEntry( QColor(0xB2,0xB2,0xB2), 0, 0 ),
111 ColorEntry(QColor(0x00,0x00,0x00), 0, 1 ),
ColorEntry( QColor(0xFF,0xFF,0xFF), 1, 0 ),
112 ColorEntry(QColor(0x68,0x68,0x68), 0, 0 ),
ColorEntry( QColor(0xFF,0x54,0x54), 0, 0 ),
113 ColorEntry(QColor(0x54,0xFF,0x54), 0, 0 ),
ColorEntry( QColor(0xFF,0xFF,0x54), 0, 0 ),
114 ColorEntry(QColor(0x54,0x54,0xFF), 0, 0 ),
ColorEntry( QColor(0xFF,0x54,0xFF), 0, 0 ),
134 #define COLOR_SPACE_UNDEFINED 0
135 #define COLOR_SPACE_DEFAULT 1
136 #define COLOR_SPACE_SYSTEM 2
137 #define COLOR_SPACE_256 3
138 #define COLOR_SPACE_RGB 4
255 if (u < 8)
return base[u+2 ].
color; u -= 8;
259 if (u < 216)
return QColor(255*((u/36)%6)/5,
261 255*((u/ 1)%6)/5); u -= 216;
264 int gray = u*10+8;
return QColor(gray,gray,gray);
291 #endif // CHARACTERCOLOR_H
friend bool operator==(const CharacterColor &a, const CharacterColor &b)
Compares two colors and returns true if they represent the same color value and use the same color sp...
An entry in a terminal display's color palette.
bool isValid()
Returns true if this character color entry is valid.
bool operator==(const CharacterColor &a, const CharacterColor &b)
static const ColorEntry base_color_table[(2 *(2+8))]
A single character in the terminal which consists of a unicode character value, foreground and backgr...
#define COLOR_SPACE_DEFAULT
Describes the color of a single character in the terminal.
CharacterColor(quint8 colorSpace, int co)
Constructs a new CharacterColor using the specified colorSpace and with color value co...
QColor color
The color value of this entry for display.
ColorEntry()
Constructs a new color palette entry with an undefined color, and with the transparent and bold flags...
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
bool transparent
If true character backgrounds using this color should be transparent.
void operator=(const ColorEntry &rhs)
Sets the color, transparency and boldness of this color to those of rhs.
ColorEntry(QColor c, bool tr, bool b)
Constructs a new color palette entry.
CharacterColor()
Constructs a new CharacterColor whoose color and color space are undefined.
bool bold
If true characters drawn using this color should be bold.
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
QColor color(const ColorEntry *palette) const
Returns the color within the specified color .
#define COLOR_SPACE_UNDEFINED
void toggleIntensive()
Toggles the value of this color between a normal system color and the corresponding intensive system ...
const QColor color256(quint8 u, const ColorEntry *base)
friend bool operator!=(const CharacterColor &a, const CharacterColor &b)
Compares two colors and returns true if they represent different color values or use different color ...
#define COLOR_SPACE_SYSTEM
bool operator!=(const CharacterColor &a, const CharacterColor &b)