Houdini 20.5 Reference Windows

Syntax highlighting color editor

You can choose a set of colors Houdini uses for syntax highlighting code such as VEX, Python, and USDA, or make your own syntax coloring scheme.

On this page

How to

To...Do this

Choose a preset color scheme

  1. In the main menus, choose Edit ▸ Syntax Highlighting to open the color editor.

  2. Click one of the preset color schemes in the list on the left side of the window to select it.

    You can preview how the selected color scheme looks with various languages using the Preview pop-up menu.

  3. To use the selected color scheme in Houdini, click Accept (to apply the change and close the window) or Apply (to apply the change but keep the editor window open).

Make your own color scheme

  1. In the main menus, choose Edit ▸ Syntax Highlighting to open the color editor.

  2. Click one of the preset color schemes in the list on the left that you want to use as the basis for your new color scheme.

  3. Click Duplicate.

  4. In the pop-up window, enter a name for the new color scheme, then click Accept.

  5. Edit the colors associated with the different syntax types.

    • Click a color name (such as Strings or Numbers) to open a color editor. If you know the RGB hex for the color you want, you can click the hex number to the right of the name to edit it directly.

    • You can change the display name of the scheme using the Name field, and add a bit of descriptive text in the Description field.

    • Click Save (below the Description field) to save changes to the selected color scheme.

      This only writes the current changes to the preferences file containing the color scheme, it does not apply the color scheme to Houdini.

    • Click Revert to discard any changes since the last time you saved the color scheme.

Notes

  • Changing the Text Box Background and Plain colors affects all text fields in Houdini, not just code editors.

  • The dialog displays any HOUDINI_PATH/config/ColorSchemes/*.json it finds on the path, even though when you create a color scheme it always saves it to your preferences directory (in $HOUDINI_USER_PREF_DIR/config/ColorSchemes). If you want to share a color scheme file, you can save it into your preferences and then move the file to a shared directory on the Houdini path.

  • If you create a new color scheme, Houdini generates a filename for it based on the name you enter when you click Duplicate. If you then edit the scheme’s name using the Name text field and click Save, it changes the name displayed in the UI but the filename stays the same. To change the filename, find the file in your preferences folder and rename it there.

  • The dialog shows the file path of the selected scheme in the bottom left corner. You can select it there and copy it to the clipboard.

Limitations

  • Currently there is no way to delete color schemes from the dialog. To delete a color scheme, find the file in your preferences folder and delete it there.

  • Houdini has a limited number of different types of syntax it can color, compared to a standalone text editor, and the types are shared between different languages.

  • Houdini uses different background colors in parameter fields to indicate various states (such as keyframed parameters), and some color schemes may not work well with all the possible background colors.

  • The syntax highlighting preview in the window uses Qt syntax highlighters, which are separate, parallel implementations to the highlighting in the native Houdini UI. So, for example, the VEX highlighting preview may not exactly match the highlighting of VEX snippets in the parameter editor.

How it works

In versions of Houdini prior to 20.5, if you wanted to change one of the UI colors, you had to duplicate the entire $HFS/houdini/config/UIDark.hcsfile into your $HOUDINI_USER_PREF_DIR/config` directory, then edit the lines you wanted to change. Then if Houdini ever added or changed a color, it wouldn’t be in your copy of the file, which could cause problems.

Since version 20.5, Houdini loads and overlays all .hcs files it finds on the path. So you can create a “snippet” .hcs file in your prefs that only contains the colors that you want to override, and Houdini will use those colors and get all others from lower levels in the path ($HFS). This is how the syntax highlighting editor works: when you click Apply, it writes a snippet of .hcs to your prefs/config directory that only overrides the colors related to syntax highlighting.

For legacy reasons, Houdini chooses which .hcs files in the path apply to a given color scheme NOT by filename, but rather by this line inside the file:

Scheme: Houdini Dark

…so if you make an override file you need to include that line. This also means you don’t need to name your file UIDark.hcs, it just needs the .hcs extension.

Windows