Colorbar

A Mathematica package to design custom color functions

View the Project on GitHub rsmenon/ColorBar

ColorBar

ColorBar is an interactive ColorFunction designer for Mathematica. It allows you to easily modify existing color functions, change colors or vary the blending fraction and get the final result in other applications. You can also use it directly inside a plotting function.

Installation & basic usage

Copy the ColorBar.m file to your $UserBaseDirectory and load it in via Needs["ColorBar`"]. The ColorBar function can be used with built-in color functions

ColorBar usage: built-in

or with custom color functions

ColorBar usage: custom

Use Setting to extract the corresponding color function.

Setting

Modifying control points

Example

Use "Evaluate in place" on ColorBar[] in the following code to use the colorbar designer inside a plotting function.

DensityPlot[x^4 - 2 x^2 + y^4 - 2 y^2 + 1, {x, -2, 2}, {y, -2, 2}, 
    ColorFunction -> Setting@ColorBar[], PlotPoints -> 150, PlotRange -> {-2, 2}]

Example