Regex Colors
Click the Regex Colors button on the Editors page in the
Preferences dialog to customize the color palette that RegexBuddy uses for regular expressions and replacement strings.

Color Palettes
- Default light: The default color palette when the white theme is selected in the
View menu. The palette’s plain text color uses the theme’s window text and background colors, which for the white theme are the default window text and background colors used by Windows itself. In Windows 7 you can change these colors in the Appearance section in the Windows Control Panel. Windows 10 and 11 don’t have these settings, but still allow the window colors to be changed by loading a Windows 7 theme or changing some registry keys. This palette has distinct colors for all of the items. Choose it if you like very detailed syntax coloring for your regular expressions and replacement strings. - Default dark: The default color palette when the dark or black theme is selected in the
View menu. The palette’s plain text color uses the theme’s window text and background colors, which are white on dark gray for the dark theme and white on black for the black theme. This palette too has distinct colors for all of the items, producing very detailed syntax coloring for your regular expressions and replacement strings. - Silver: Same colors as the default light palette, but with black text on a silver background. This is easier on the eyes if your monitor has a very high brightness.
- Gray: Same colors as the default dark palette, but with white text on a gray background that is not as dark as the dark gray used by the dark theme. The reduced contrast is easier on the eyes on monitors with very deep blacks.
- Regex tree: The icons in the regex tree on the Create panel come in 4 different colors. This palette applies those colors to the regular expression so that the color of each regex token is the same as the color of the icon of the node that explains it on the Create panel. Intended for use with the light theme.
- Regex tree inverted: Same idea as the “regex tree” palette, but it uses the background colors of the icons to display the text in the regular expression. It uses the colors of the symbols on the icons to highlight the background of the regular expression. Intended for use with the dark and black themes.
- Soft white: Low contrast palette with dark gray text on a white background. Colors are similar to the default light palette, but much less intense. Only uses 3 different shades for nested capturing groups.
- Soft silver: Low contrast palette with black text on a silver background. Colors are similar to the default light palette, but much less intense. Only uses 3 different shades for nested capturing groups.
- Soft gray: Low contrast palette with white text on a medium gray background. Colors are similar to the default dark palette, but much less intense. Only uses 3 different shades for nested capturing groups.
- Soft dark: The palette’s plain text color uses the theme’s window text and background colors, which are white on dark gray for the dark theme and white on black for the black theme. Colors are similar to the default dark palette, but much less intense. Only uses 3 different shades for nested capturing groups.
- None: Uses the theme’s window text and background colors for the entire regular expression and replacement text. RegexBuddy does not have an option to completely disable syntax coloring of the regular expression and replacement text because it still needs to parse them to produce the regex tree on the Create panel. Selecting the “none” palette makes it appear as if syntax coloring is disabled, while still keeping all of RegexBuddy’s functionality enabled.
- RegexBuddy 4: Makes RegexBuddy 5 apply the same colors to regular expressions as the default palette in RegexBuddy 4 did. Depends on the light theme, which is the only theme RegexBuddy 4 had. Uses fewer colors than the default RegexBuddy 5 palette. In RegexBuddy 4, character escapes, backreferences, anchors, and quantifiers were always highlighted with the same color (light blue by default). Capturing groups and lookaround always used the same 5 nesting colors (shades of green) as all other groups.
- RegexBuddy 4 white on black: Makes RegexBuddy 5 apply the same colors to regular expressions as the “white on black” palette in RegexBuddy 4 did. Always uses a black background, even when the theme is light.
- RegexBuddy 3: Makes RegexBuddy 5 apply the same colors to regular expressions as the default palette in RegexBuddy 3 did. Depends on the light theme, which is the only theme RegexBuddy 3 had. Uses fewer colors than the default RegexBuddy 5 palette. In RegexBuddy 3, character escapes, backreferences, anchors, and meta tokens were always highlighted with the same color (light blue by default). Capturing groups and lookaround always used the same 5 nesting colors (shades of green and olive) as all other groups. Quantifiers always had the same color as the token or group they repeated.
- RegexBuddy 3 white on black: Makes RegexBuddy 5 apply the same colors to regular expressions as the “white on black” palette in RegexBuddy 3 did. Always uses a black background, even when the theme is light.
- Harmonized light: Applies 12 colors that are equidistant on the color wheel and of equal brightness to the text of the regular expression, on a light gray background. This gives your regexes a uniform low-contrast look. Nested groups use only 2 alternating colors.
- Harmonized dark: Uses the exact same 12 colors as “harmonized light”, but on a dark gray background.
- Harmonized shades light: Applies 12 colors with equal medium high brightness and low saturation that are equidistant on the color wheel and of equal brightness to the background of the regular expression, on a light gray background. This gives your regexes a uniform low-contrast look. Nested groups use only 2 alternating colors. Character escapes, backreferences, anchors, and quantifiers use the same color. Character classes use a single color.
- Harmonized shades dark: Same as “harmonized shades light” but with 12 colors of equal medium low brightness.
- Harmonized shades print: Same as “harmonized shades light”, but using pure white background.
- Solarized light: Using the 16 colors of the Solarized palette created by Ethan Schoonover. Nested groups use only 2 alternating colors.
- Solarized dark: Same as “solarized light” but using the opposite content and background tones.
- Amber: Amber text on a dark gray background like old terminal monitors. Detailed syntax coloring with saturated colors similar to the default dark palette.
- Green: Green text on a dark gray background like old terminal monitors. Detailed syntax coloring with saturated colors similar to the default dark palette.
- Night light: Very dark palette with amber text. Uses amber, yellow, and green for syntax coloring. Does not use any blue colors. Applies syntax coloring to the text of some regex tokens and to the background of other regex tokens to provide detailed syntax coloring with a limited number of shades. Nested groups use 4 alternating colors.
- Monochrome light: Dark gray text on a light gray background. Uses different shades of gray for limited syntax coloring.
- Monochrome dark: As “monochrome light” with the inverse shades of gray.
- Monochrome amber: Amber text on a dark gray background like old terminal monitors. Uses different shades of amber for limited syntax coloring.
- Monochrome green: Green text on a dark gray background like old terminal monitors. Uses different shades of green for limited syntax coloring.
- Monochrome print: As “monochrome light” but with pure black text on a pure white background.
- Red-green color blind light: Intended for people who cannot perceive the difference between red and green. All colors have equal amounts of red and green. Dark gray text on a light gray background. Uses shades of yellow and blue for syntax coloring.
- Red-green color blind dark: As “red-green color blind light” but with light gray text on a dark gray background.
- Red-green color blind print: As “red-green color blind light” but with pure black text on a pure white background.
- Yellow-blue color blind light: Intended for people who cannot perceive the difference between yellow and blue. All colors have equal amounts of green and blue. Dark gray text on a light gray background. Uses shades of red and cyan for syntax coloring.
- Yellow-blue color blind dark: As “yellow-blue color blind light” but with light gray text on a dark gray background.
- Yellow-blue color blind print: As “yellow-blue color blind light” but with pure black text on a pure white background.
- Visual Studio light: Emulates the colors used by Microsoft’s Visual Studio light theme for highlighting regular expressions. Only works well with the light theme because it uses the theme’s window text and background colors. Some of the logic behind the colors is different than with all other palettes. All groups use the same color. Alternation uses the same color as groups, even when not inside a group. Backreferences also use the grouping color. Tokens inside character classes have the same colors as the same tokens outside character classes.
- Visual Studio dark: Emulates the colors used by Microsoft’s Visual Studio dark theme. It use the same coloring logic as the light theme.
List of Individual Colors
The colors prefixed with “regex” are combined to determine the colors of the various parts of your regular expressions and replacement texts. For some regex tokens, the color is determined by layering two of these colors on top of each other. All colors (background, text, underline, strikeout) and all styles (bold, italic, underline, strikeout) are determined separately when layering colors. A “default” color or an “unchanged” style does nothing when it is layered on top of another color. If all layers use the “default” colors then the window colors of the active theme are used.
The colors prefixed with “editor” are used to draw various parts of the editor control for regular expressions.
- Editor: Plain text: Literal text in the regular expression. The editor’s background is filled with this color.
- Editor: Selected text: Selection highlight.
- Regex: Syntax error: Any invalid combination of characters in regular expressions.
- Regex: Escaped literal: A metacharacter that was escaped to be treated as a literal character, or a literal character that was needlessly escaped.
- Regex: Character escape: A non-printable character escape or a hexadecimal character escape.
- Regex: Regular expression token: Characters with a special meaning in regular expressions not covered by any of the other colors.
- Regex: Reference to group: Backreferences and subroutine calls.
- Regex: Anchors: Anchors that match at the start or end of a line or the subject string and word boundaries.
- Regex: Meta token: Mode modifiers and backtracking control verbs. Thesecontrol the behavior of the regular expression but do not match anything themselves.
- Regex: Comment: A comment in a regular expression.
- Regex: Character class brackets: The square brackets around a character class in a regular expression.
- Regex: Character class literal text: Characters that are matched literally inside a character class.
- Regex: Character class escaped literal: A metacharacter inside a character class that was escaped to be treated as a literal character, or a literal character that was needlessly escaped.
- Regex: Character class character escape: A non-printable character escape or a hexadecimal character escape inside a character class.
- Regex: Character class token: Anything else inside a character class not covered by the above colors.
- Regex: Character class range: Color layered on top of a range in a character class. The hyphen that creates the range is highlighted with “character class brackets” and then “character class range” on top of that. The tokens to the left and right of the hyphen are each highlighted with 1 of the 4 preceding character class colors according to the token they are, with the “character class range” token on top of that. The default palette sets the “character class range” color to a thick underline with the text and background colors “unchanged” so that the tokens that make up the range have their usual colors with an extra underline marking the range.
- Regex: Alternation: Color of the vertical bar. If all parts of this color are set to “default” and “unchanged” then alternation operators inside groups use the exact same color as the innermost group that contains it, including the layering for capturing groups or lookaround, if applicable. Alternation operators outside of all groups use the “regular expression token” color. The default palette and the RegexBuddy 3 and 4 palettes work this way. If any part of this color is set to something other than “default” or “unchanged” then all alternation operators (inside and outside groups) are colored using only the “alternation” color. The “alternation” color is never layered on top of another color. The “regex tree”, “night light” and Visual Studio palettes are examples that assign a specific text color to the “alternation” color which is then used for all alternation operators.
- Regex: Quantifier: Color for quantifiers. If any part of this color is set to something other than “default” or “unchanged” then all quantifiers are colored using only the “quantifier” color. Most predefined palettes do this. Some, like the default palette, use a unique color for quantifiers. Others, like the “regex tree” and RegexBuddy 4 palettes, assign the same colors to “quantifier” and “regular expression token”, giving all quantifiers, including those that repeat groups, the same colors as other regular expression tokens. But if all parts of the “quantifier” color are set to “default” and “unchanged” then quantifiers that repeat groups use the exact same color as the group they repeat. This can make it look as if the quantifier is part of the closing parenthesis. Quantifiers on other tokens then use the “regular expression token” color, even if the token being repeated uses another color. The RegexBuddy 3 palettes work this way.
- Regex: Capturing group: Named and numbered capturing groups are colored according to their nesting level. The “capturing group” color is layered on top of that. Set all parts to “default” and “unchanged” to use the same colors for capturing groups as for other groups. The RegexBuddy 3 and 4 palettes do this. But most of the predefined palettes have the background and text colors for “capturing group” set to “default” but the bold style set to “bold”. This results in capturing groups using the same colors as other groups, but highlighted in bold.
- Regex: Lookaround: Lookaround groups are colored according to their nesting level. The “lookaround” color is layered on top of that. Set all parts to “default” and “unchanged” to use the same colors for lookaround as for other groups. The RegexBuddy 3 and 4 palettes do this. But many of the predefined palettes specify the same text and background colors for the “lookaround” color as for the “anchors” color. This overrides the nesting level colors, resulting in all lookaround having the same color as anchors. This emphasizes the fact that lookaround finds a zero-length match (just like anchors do) over the lookaround’s nesting level. It’s rare for lookaround to be nested.
- Regex: Group (nesting level 1 to 5): Any pair of parentheses in a regular expression. Nested parentheses can be highlighted in different colors to make it easier to see which opening parenthesis is paired with which closing parenthesis. The colors repeat after the last nesting level. If you set all colors to “default” and all styles to “unchanged” for a particular nesting level then that level and any higher levels are unused. Nested groups then rotate between fewer colors. Assigning colors to nesting levels 1 and 2 but leaving nesting level 3 as “default” and “unchanged”, for example, results in nested parentheses alternating between the colors for levels 1 and 2. The “regex tree” and Visual Studio palettes only assign nesting level 1, giving all groups the same color.
- Editor: Page break: Color of the horizontal line indicating a page break.
- Editor: Line breaks: Color used to draw line break symbols when you’ve turned on the option to visualize line breaks.
- Editor: Whitespace: Color used to draw whitespace. The background color is always used if you set it to anything other than “default”. The text color is used to draw the space and tab symbols when you turn on the option to visualize spaces.
- Editor: Control characters: Color used to draw control characters other than tabs and line breaks that are included as literal characters in the regular expression.
- Editor: Invalid bytes: Color used to draw stair-stepped hex numbers to indicate bytes in the regex that are not valid for the regex’s encoding. This can only happen if you copy and paste invalid bytes from a file that contained invalid bytes or was loaded with the wrong encoding. You should delete these from your regular expression.
- Editor: Extra space between lines: If the text layout adds extra space between lines then this color is used for that extra space. This can simulate the appearance of lined paper.
- Editor: Matching brackets: Color used to highlight the parentheses of the capturing group that the text cursor points at.
Example
When configuring syntax highlighting colors, you can select one of the available coloring schemes to see an example. Each coloring scheme has its own example text that shows the most important color elements of the scheme. You can double-click any text in the example to select the individual color that was applied by the syntax coloring scheme.
The example does not necessarily show all color elements. You can type in or paste in your own example to test the colors. Your example won’t be saved. If you select a different coloring scheme in the drop-down list then the example is reset to what is stored in the scheme.
Import and Export
When customizing the palettes for the Regex panel in RegexBuddy 5, you can import palettes exported from the file type configuration in EditPad 8. RegexBuddy 5 can also import palettes exported after clicking Customize Search Palette on the Appearance page in the Preferences in AceText 4.
If you export a palette when customizing the palettes for the Regex panel in RegexBuddy 5 then you can import that palette while customizing the Search palette in AceText 4. EditPad 8 cannot import RegexBuddy 5 palettes because it expects syntax colors and regex colors in the same palette, while RegexBuddy 5 uses separate palettes for those.
Older versions of these products did not have the ability to export and import palettes at all.