Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
Color definitions

Here we describe the structure of embedded escape sequences used to implement syntax highlighting. More...

Modules

 Color escape characters
 Initiate/Terminate a color tag.
 
 Color tags
 Specify a color for a syntax item.
 
 Color string constants
 These definitions are used with the COLSTR macro.
 
 Line prefix colors
 Note: line prefix colors are not used in processor modules.
 
 Convenience functions
 Higher level convenience functions are defined in ua.hpp.
 

Macros

#define COLOR_ADDR_SIZE   (sizeof(ea_t)*2)
 Size of a tagged address (see COLOR_ADDR)
 
#define COLSTR(str, tag)   SCOLOR_ON tag str SCOLOR_OFF tag
 This macro is used to build colored string constants (e.g. More...
 

Typedefs

typedef uchar color_t
 color tag - see Color tags
 

Detailed Description

Here we describe the structure of embedded escape sequences used to implement syntax highlighting.

IDP module should insert appropriate escape characters into the output lines as necessary. This approach allows to create an IDP module without the syntax highlighting too - just don't use escape sequences.

A typical color sequence looks like this:

COLOR_ON COLOR_xxx text COLOR_OFF COLOR_xxx

The first 2 items turn color 'xxx' on, then the text follows, and the color is turned off by two last items.

For the convenience we've defined a set of macro definitions and functions to deal with colors.

Macro Definition Documentation

◆ COLSTR

#define COLSTR (   str,
  tag 
)    SCOLOR_ON tag str SCOLOR_OFF tag

This macro is used to build colored string constants (e.g.

for format strings)

Parameters
strstring literal to surround with color tags
tagone of SCOLOR_xxx constants