Skip to content

ColorTable defaults

A collection of changes that are mostly geared at making the default ColorTable sensible. Previously the default ColorTable was empty, which could be confusing to anyone who uses it.

The first step is defining what the "default" color table should look like. To make this more clear, I've added a preset named default that is a copy of cool to warm (but which we could change if we so desired). I've also added an enum to ColorTable listing the presets we like the best and putting DEFAULT at the top. This should make it clear how to specify the "default" ColorTable.

It would be nice to make the default constructor of ColorTable build the DEFAULT preset, but the default preset uses the Diverging color space, which should really only be used for a select set of color spaces. So instead, ColorTable does not have a default constructor, but it is easy to use the default preset in its place to define it wherever you need. (For example, the FieldToColors filter now uses the DEFAULT preset in its own constructor.)

Merge request reports