if (Index>=Count) or (Index<0) then raise Exception.CreateFmt(ErrTooManyEntries,[Index, Count-1]);
SetCardinal(Data, 2+Index*4, Value);
end;
function StandardPalette(const Index: integer): LongWord;
const
StdArray: array[Low(TColorPaletteRange)-1..High(TColorPaletteRange)-1] of LongWord=
( 0,
16777215,
255,
65280,
16711680,
65535,
16711935,
16776960,
128,
32768,
8388608,
32896,
8388736,
8421376,
12632256,
8421504,
16751001,
6697881,
13434879,
16777164,
6684774,
8421631,
13395456,
16764108,
8388608,
16711935,
65535,
16776960,
8388736,
128,
8421376,
16711680,
16763904,
16777164,
13434828,
10092543,
16764057,
13408767,
16751052,
10079487,
16737843,
13421619,
52377,
52479,
39423,
26367,
10053222,
9868950,
6697728,
6723891,
13056,
13107,
13209,
6697881,
10040115,
3355443);
begin
if (Index<0) or (Index>High(TColorPaletteRange)-1) then Raise Exception.CreateFmt(ErrXlsIndexOutBounds,[Index,'Palette index' ,0,High(TColorPaletteRange)-1]);