Color a marker from color gradient

Dear rooters,

I am setting by hand size and color of single marker.
I know hot to define a personalized color palette with TColor::CreateGradientColorTable(…)
but how can I acess this color palette to pick up a color inside ? (and specially how can I associate it to a range ? )

I tried TGraph2D but it does not do what I want. so it seems that I have to define my graph marker by marker (and this method is really more flexible and powerful…)

P.S. 2
Changed the title for more clarty

do you have a small script showing what you wants to do ?
The way to use the palette is like any palette …
The is an very detailed HowTo on the root web site about that.

Here is key part of my code

 vector<TMarker> v_mark;
for (...)
   //Calculate marker position
   TMarker mark(v3diff.X(),v3diff.Y(),4);
//later draw the marker  

Basically I would like to Set the Marker color following the color gradient defined before but I have no clue how.
(Here I do it from kRed-10 to kRed+…)
So my problem is not to use my Palette, but to get a color from any palette (I searched in TColor doc but didn’t find anything)

According to the code the value returned by TColor::CreateGradientColorTable gives the index where the color palette starts:

[quote]So my problem is not to use my Palette, but to get a color from any palette[/quote]An example of what you were looking for may be here: TH2, col above lego (ztest.cpp)