So I wanted to manipulate through both the color schemes and the RGB color within that scheme but encountered a problem. I started by defining a function:
txt[input_] := InputForm[TextString[input]];
Such that I could preserve the quotation marks applied to input
, needed for ColorData["input"]
. Then a list of a few schemes was built:
list = txt /@ {Rainbow, DarkRainbow, Pastel}
giving
{InputForm["Rainbow"], InputForm["DarkRainbow"], InputForm["Pastel"]}
Which then allows for list[[x]]
, so that manipulating {x,1,Length[list],1}
cycles through the scheme in ColorData:
Manipulate[ColorData[list[[y]]][x], {y, 1, Length[list], 1}, {x, 0, 1}]
Which doesn't output correctly. Taking the part of the list seems to work fine, but the InputForm["Rainbow"]
inserted into ColorData[InputForm["Rainbow"]]
seems to be kicking up errors. I've tried a lot of different things but can't get it working. Any help would be much appreciated!
list
as a list of strings;list = {"Rainbow", "DarkRainbow", "Pastel"}
. Or even better just letManipulate
havey
be the list of strings;Manipulate[ColorData[y][x], {y, list}, {x, 0, 1}]
. $\endgroup$Head[InputForm["DarkRainbow"]]
andHead["DarkRainbow"]
.ColorData
yields aColorDataFunction
when an argument has a headString
and is the name of a known color scheme. $\endgroup$