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.
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
or with custom color functions
Use Setting
to extract the corresponding color function.
-
Click and drag the control points (triangles) to change the transition region
-
Click on a control point to change its color
-
Click while holding down Command (or Alt in Windows & Linux) to add a control point at that location.
-
Click on a control point while holding Shift to delete a control point (a minimum of 2 control points will always remain).
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}]