Color Palettes

The Editors page in the Preferences dialog has four buttons that let you customize four different color palettes that RegexBuddy uses for its various text editing controls.

The predefined palettes and the individual colors available to them are different for all four. You can find all the details in the topics dedicated to them. This topic explains the customization process, which is the same for all four palettes.

Customizing Palettes

Regex Colors

The built-in palettes cannot be customized. If you try to edit any of the individual colors then RegexBuddy automatically makes a copy of the palette that you can then edit. You can also duplicate the selected palette by clicking the New button. Click the Delete button to remove a custom palette.

You can share palettes with others by clicking the Export button to save a palette as an .ini file. The Import button allows you to import an .ini file saved by the Export button. It will not import any other .ini files.

Each palette should have a name so you can select it in the list of palettes in the file type configuration.

If you create light and dark versions of the same palette, then you should set the “palette theme” option accordingly. After you have set “palette theme” you can select a custom palette of the opposite theme in the “companion light/dark palette”. If you do this changing themes also swaps this palette between its light and dark versions.

Changing Individual Colors

If you customize one of the harmonized, solarized, or monochrome palettes then the color picker restricts you to the specific set of harmonized, solarized, or monochrome colors that are available to the palette you’re customizing. To change a color, simply click the Color button and then click on the color you want.

For all other palettes, the color picker shows a grid of 5 rows of 8 common colors. Any other colors used by your palette are shown below the 40 common colors. The other colors are shown in the order of the first individual color that uses that color. The default palette, for example, uses different shades of red for markup tags and markup attributes. The red of markup tags is listed first because “markup tags” is above “markup attributes” in the list of individual colors. Each color is shown only once. All the color buttons show the same color picker. So the Background Color button also shows colors that are only used for text, for example.

You can pick a more specific color by clicking the More button to show the color hexagon. The colors on the outer edge of the hexagon are always fully saturated. The colors nearer to the center of the hexagon are progressively desaturated towards white, gray, or black. Click on the vertical grayscale slider to change the luminance of the colors in the center of the hexagon. If you want to pick a pure grayscale value, click on the horizontal line of small gray hexagons. If you want pure white or black, click on the larger black or white hexagon to the left or right of the gray hexagons. If you want to use a specific RGB value, enter three numbers between 0 and 255 in the edit boxes that are shaded red, green, and blue.

The color hexagon, along with the vertical grayscale slider, makes it easy to pick related colors. The concepts that follow may be easier to understand if you see the large color hexagon as a circle with discrete steps, and the small hexagons that comprise it as positions at a certain radius and angle. Colors with the same distance to the center (same radius) have the same amount of saturation. The colors at the edge are always fully saturated and the color at the center is always fully desaturated. You can change the hue without changing the saturation by selecting another color at the same distance (same radius, different angle). You can change the saturation without changing the hue by selecting a color closer to or further away from the center (different radius, same angle). For colors that are not fully saturated, the grayscale slider controls the luminance. To make a color lighter or darker, first click on the grayscale slider to change the luminance. Then click on the same spot in the color hexagon to select the same color with the different luminance.

Syntax elements that use colors of different hues but similar saturation and luminance allow those elements to be distinguished without drawing attention to some over the others. Syntax elements for important structural parts of the file can be given colors with more luminance while syntax elements for less important parts or more common parts (large blocks of text) can be given colors with less luminance to make it easier for the eye to gravitate towards the important elements. This can be further enhanced by using bold text for the most important syntax elements. If the base (plain text) color of the scheme is white, gray, or black, then setting the luminance slider at that level of white, gray, or black allows you to use more saturated colors for more important elements and less saturated colors for less important elements, as an alternative technique to using luminance. Color schemes that use very saturated colors appear bolder, while color schemes with (somewhat) desaturated colors (using luminance instead of saturation for highlighting) appear more relaxing.

If you prefer to use the standard Windows color selection dialog box to pick your colors, right-click the Background Color or Text Color button. This dialog allows you to specify hue and saturation using a two-dimensional grid and luminance using a vertical slider. You can also enter HSL or RGB values with the keyboard. If you do this while customizing a harmonized, solarized, or monochrome palette then you can break the restricted nature of the palette.

If you want to use exactly the same color for two items, first select the item that already has the color you want. Click the Color button that has the color you want. One of the color squares in the color picker should have a beveled edge. Note its location in the grid of squares.

After observing the color, click on the item in the list that should have the same color. The color picker automatically closes when you do this. Click the Color button that should have the same color. Click on the same square in the grid that you observed.

You can use the Copy and Paste buttons to make two individual colors identical. Clicking Paste changes all the colors and styles of the selected individual color to the ones that you copied.

Font Styles

Syntax coloring can also change the font style (underline, bold, and/or italic) in addition to changing the text and background colors. Underline color and underline style can be set independently. The "unchanged" style keeps the underline style unchanged, but not necessarily the underline color. Setting the underline color to "default" leaves the color unchanged. The default underline color is the same color as the text color. The following underline style are available:

The bold style has three options:

The italic style also has three options, but they work a little different: