To edit color maps, select the "Tools" menu, then "Color Mapping", and then "Editing Mappings" from the sub menu. This will launch Microsoft Window's Notepad editor to modify an ASCII text file containing your color maps definitions.

The Color Map file can include author/description meta data along with the color definitions.  Users can create color maps for both hex strings and character ranges.  Only hex strings can be added from the Add Color Map dialog; however, all of the information is persisted, except comments.

The order of color map definitions is not important.  Hex Workshop internally sorts the color maps by hex sequence length prior to applying them.  If color maps overlap, Hex Workshop selects the more complex (longer) color map over shorter ones.

Comments (#)

Users can add comment lines to the color map file by starting the line with a pound symbol (#).  All data on that line is ignored.

Warning: If you edit the color map through the editor, comments are lost when the file is saved.  This includes both adding color maps via the user interface and the "Tools\Color Mapping\Edit Mappings..." menu selection.

!author

The author attribute declares who created the color map definition file.  This information is not used within Hex Workshop and is used for decoration purposes.

Format:

!author="<AUTHOR>"

Example:

!author="BreakPoint Software, Inc."

!description

The description attribute declares who created the color map definition file.  This information is not used within Hex Workshop and is used for decoration purposes.

Format:

!description="<DESCRIPTION>"

Example:

!description="Color mappings to highlight non-ASCII data"

Color map Definitions

Color maps are defined in the following form:

<Hex Sequence> = <Color Definition>

or

<Character Range> = <Color Definition>

Hex Sequences

Hex Sequences or strings define a search string within the editor.  Strings are limited to 32 bytes of data (64 characters) and must be quoted.

Format:

"<HEX SEQUENCE>" = <Color Definition>

Examples:

"0000" = <Color Definition>

"FF0000" = <Color Definition>

Character Ranges

Character Ranges define a range of characters that should match a color mapping.  This is useful if one wants to highlight or de-emphasis ASCII characters or control characters.  The range is specified as decimal numbers between 0 and 255.

Format:

charrange(<start>, <end>) = <Color Definition>

Examples:

charrange(0, 32) = <Color Definition>

charrange(65, 122) = <Color Definition>

Color Definitions

Color maps can define foreground, background, and border rectangle colors for both the hex display and ASCII display within Hex Workshop.  Colors are defined using a standard RGB tuple where each value represents a Red, Green, and Blue color component.  The color components range from 0 to 255.  

For example, <RGB>(255, 0, 0) represents Red and <RGB>(128, 128, 128) represents grey.

The foreground, background, and border rectangle colors are defined using the following keywords:

 

Hex Area

ASCII Area

Foreground Color

hexFgRGB

asciiFgRGB

Background Color

hexBgRGB

asciiBgRGB

Border Rectangle Color

hexRectRGB

asciiRectRGB

 

A single RGB keyword can be used if setting the same foreground or background color for both the hex area and ASCII area.  Mixing RGB with individual color keywords may result in an error or unpredictable results.

Also, a comment keyword allows users to add a description for individual color maps.  This comment is displayed in the editor if the mouse cursor hovers over color mapped data.

Format:

<Hex Sequence> | <Character Range> = <Foreground>,<Background>,<Border>,<Comment>

<Foreground> = [ RGB(...) | [ hexFgRGB(...) ] [, asciiFgRGB(...)] ]

<Background> = [ RGB(...) | [ hexBgRGB(...) ] [, asciiBgRGB(...)] ]

<Border> = [ hexRectRGB(...)] [, asciiRectRGB(...)]

<Comment> = comment("<COMMENT>")

Examples:

  1. Display all instances of "AAAA" with a red foreground

    "AAAA" = RGB(255, 0, 0), comment("Red Foreground")

  2. Display all instances of "BBBB" with a yellow background

    "BBBB" = hexBgRGB(255, 255, 0), asciiBgRGB(255, 255, 0)

  3. Display all instances of "CCCC" with a red foreground, grey ASCII background and yellow hex background

    "CCCC" = RGB(255, 0, 0), hexBgRGB(255, 255, 0), asciiBgRGB(128, 128, 128)

  4. Display all instances of "DDDD" with a yellow foreground and grey border rectangle.

    "DDDD" = RGB(255, 0, 0), asciiRectRGB(128, 128, 128), hexRectRGB(128, 128, 128)

A complete color map file including the examples above, might look like the following:

##############################################################################
# Hex Workshop Color Map Definition File (cmap)
##

 

!author="BreakPoint Software, Inc."
!description="Hex Workshop Help Example Colormaps"

 

"AAAA" = RGB(255, 0, 0), comment("Red Foreground")
"BBBB" = asciiBgRGB(255, 255, 0), hexBgRGB(255, 255, 0)
"CCCC" = RGB(255, 0, 0), asciiBgRGB(128, 128, 128), hexBgRGB(255, 255, 0)
"DDDD" = RGB(255, 0, 0), asciiRectRGB(128, 128, 128), hexRectRGB(128, 128, 128)

 

For additional information, please see:

Color Mapping Overview
Adding a Color Map

Opening and Saving Color Maps