I use the following code How can I create an interactive ColorFunction using Manipulate? to create my dynamic color. If I succeded to create the slider between -1 to 1, I can't see the first colors (Blue color) which has the negative value -1. My legend bar (see picture) start from light blue not blue I don't understand why...
With[{cmax = 12},(*maximum number of colors*)
DynamicModule[{k = 6,
cols = {Blue, LightBlue, White, White, Yellow, Red},
vals = {-1, -0.41, 0.45, 0.5, 0.75, 1.}},
Panel[Column[{Column[{Row[{Dynamic[
Style["colors: " <> IntegerString[k], Bold]], Spacer[20],
Slider[Dynamic[k, (k = #; cols = PadRight[cols, k, Gray];
vals = Rescale[ArrayPad[vals, {0, k - Length[vals]}, "Extrapolated"]]) &], {2, cmax, 1}]}],
Dynamic[Multicolumn[
Array[Column[{ColorSlider[Dynamic[cols[[#]]]],
Row[{Dynamic[Style[vals[[#]], Small, Bold]], Spacer[20],
Slider[Dynamic[vals[[#]]], {-1, 1},
ImageSize -> Small]}]}] &, k], 6,
Appearance -> "Horizontal"], TrackedSymbols :> {k}]}],
Dynamic[With[{cl = Transpose[{vals, cols}]},
Column[{Panel[LinearGradientImage[Blend[cl, #] &, {600, 60}]],
Button["Copy to clipboard",
CopyToClipboard[Defer[Blend[cl, f]]], ImageSize -> Medium,
Method -> "Queued"]}]]]}]]]]