Objective Edit : Chapter 8 The Configuration ini File : [ColorGroups] Section
[ColorGroups] Section
The [ColorGroups] section references other sections that describe color attributes that you can assign to various text categories. For example, one color group may specify the colors used for comments, while another color group may specify the colors used for operators.
Each color group assignment is specified in its own stanza. Here are some sample settings from the DevStudio.ini file:
 
[ColorGroups]
NumGroups = 7
Group1 = Text
Group2 = Text Selection
Group3 = Number
Group4 = Operator
Group5 = Comment
Group6 = Keyword
Group7 = String
Note that in this .ini file, there are stanzas named for each colorgroup. For example, the [Text] and [TextSelection] colorgroups in the DevStudio.ini file are defined as follows:
 
[Text]
Foreground = 0,0,0
Background = 255,255,255
DisplayName = Text
Configurable = 1
BackColorAutomatic = 1
ForeColorAutomatic = 1
 
[Text Selection]
Foreground = 255,255,255
Background = 0,0,0
BackColorAutomatic = 1
ForeColorAutomatic = 1
DisplayName=Text Selection
Configurable=1
The keys in these groups are named Group<n>, where <n> is a number. The NumGroups key indicates the number of color groups assigned. Incidentally, the group keys with Text and Text Selection as values are required. If these keys do not exist, they will be created if and when the .ini file is updated by your application. These settings are described in Table 16.
Table 16 – Key descriptions for [Text] section 
Key
Description
Foreground
RGB values for the foreground color.
Background
RGB values for the background color.
DisplayName
The name for this color group as it will be displayed in the color options dialog.
Configurable
Specifies whether this color can be configured using the color options dialog.
BackColorAutomatic
Specifies whether to use the automatic color for the background color. The automatic color is the color used for the background of text or selected text.
ForeColorAutomatic
Specifies whether to use the automatic color for the foreground color.
Each of the stanzas above represents the colors that are used to render ordinary text, text that is not contained in a keyword, operator, or token-based string. By the way, the [Text] and [Text Selection] stanzas are required stanzas. If they do not exist when the .ini file is read, they will be created if and when the .ini file is updated by your application.
The [Keywords] stanza lists the keywords that Objective Edit recognizes for special color rendering. Each key represents a keyword, and the value associated with the keyword is the colorgroup specifying the colors that keyword should be rendered with. Here is a small section of the [Keywords] stanza from the DevStudio.ini file:
 
[Keywords]
asm = Keyword
auto = Keyword
bad_cast = Keyword
bad_typeid = Keyword
bool = Keyword
break = Keyword
case = Keyword