Because of the standards in my field, for many plots I need to use (or at least end up using) rather narrowly defined colour schemes, and in particular the Matlab "Jet" scheme, which is well described in this SO answer. I've typically done this by having a bit of boilerplate code which I include when necessary, and which creates the object ColorData["Jet"]
:
Unprotect[ColorData];
ColorData["Jet"] =
Function[x,
Blend[Transpose[{
{0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0},
{Darker[Blue], Blue, Cyan, Green, Yellow, Red, Darker[Red]}
}], x]];
Protect[ColorData]
This is convenient because the new colour scheme can be handled using the same syntax as the in-built ones. In version 10, however, the choice of colour schemes has a bunch of additional niceties which I'd like to take advantage of it that's possible.
For example, the autocomplete menu for ColorDat...
gives you instant access to a drop-down menu with images of the schemes' gradients, and which inserts ColorData["gradient-of-your-choice"]
when you click OK.
Similarly, when you evaluate such ColorData
objects, they come out with a nice preview of the gradient.
So, my question is: is it possible to take advantage of this structure by 'injecting' additional data into ColorData
, so that custom colour schemes come up in the choices and behave in the same way as in-built ones?