This is a "hard" fork from navcolor by milankovo.
Fixes a couple of small missing details such as navbar auto refresh, adds default colors, and an option to color the n largest functions to quickly visualize large code blocks.
One of the features I wanted was to just color the navbar without the function body itself since it can become annoying to read the body depending on the used colors. Couldn't find a way because the navbar colorizer hook doesn't seem flexible enough for this.
Also implements a macOS targeted Makefile besides original ida-cmake support.
It's compatible only with IDA Pro 9.0+. The 7.x SDK misses somes features and didn't bother looking at 8.x.
Tested only in macOS, should work with Linux and Windows IDA Pro 9.x versions.
Have fun,
fG!
The Navcolor plugin is a tool for IDA Pro that enhances the functionality of the navigation band by displaying the color of the function. This allows you to easily identify functions and navigate through the disassembly.
It also provides additional features such as the ability to choose the color of a function through a context menu item in the Functions window.
All the available features can be selected from the main plugin form.
The default configured colors are very bright and have only been tested with the default IDA theme. If you use a dark theme it is probably a good idea to edit them in the source file at default_colors. Not worth the trouble to manage a config file just for this.
The included Makefile targets macOS systems. Edit the Makefile and configure the paths to IDA Pro 9.x in IDA_DIR and the path to the SDK in IDA_SDK, or set them in your shell.
If everything went ok, you should have navcolor.dylib in the same folder.
It is possible to use make install to copy the file to your individual IDA plugins folder at ~/.idapro/plugins or just copy it manually. To avoid code signing caching issues you need to remove the old plugin file before copying.
To build the Navcolor plugin, you will need to use the ida-cmake build system.
mkdir ~/src cd ~/src git clone https://github.com/allthingsida/ida-cmake.git cd ida-cmake/plugins git clone https://github.com/gdbinit/navcolor.git cd navcolor mkdir build cd build IDASDK=/replace/with/path/to/ida/sdk cmake .. makeIf build went without errors, the plugin file navcolor.dylib should be available in $IDASDK/bin/plugins/ folder.
To install just remove the old version and copy it to ~/.idapro/plugins.
Please refer to the ida-cmake documentation for instructions on how to set up and use the build system.
To install the Navcolor plugin, follow these steps:
- Copy the
navcolor.(dll|dylib)file to the IDA plugins folder at~/.idapro/plugins. - Launch IDA Pro.
- Navigate to the
Edit/Pluginsmenu. - Select the
Modify navigation band colorsoption to toggle the plugin on or off. The plugin is on by default.
On the Functions window, select the target function to color, select a default color or use the color picker and click Ok.
To color the top largest functions just select any function as target to color, select the option Color the n largest functions, change the default value of 5 if desired and click Ok.
It is also possible to clear all colors using the option Clear all function colors.
To see it in action, you can run the following code to colorize the functions in the current IDB:
import idaapi import colorsys from zlib import crc32 rgb_to_int = lambda r, g, b: (r << 16) | (g << 8) | b qty = idaapi.get_func_qty() for idx in range(qty): fnc: idaapi.func_t = idaapi.getn_func(idx) crc = crc32(idaapi.get_func_name(fnc.start_ea).encode()) color_idx = crc / 2**32 color = colorsys.hsv_to_rgb(color_idx, 0.3, 1) fnc.color = rgb_to_int(int(255 * color[0]), int(255 * color[1]), int(255 * color[2])) idaapi.update_func(fnc)

