private ColorPalette palette(Octree tree, ColorPalette old, int maxColors) { ArrayList palette = tree.palette(maxColors - 1); for (int i = 0; i < palette.Count; ++i) old.Entries[i] = (Color)palette[i]; old.Entries[maxColors] = Color.FromArgb(0, 0, 0, 0); return old; }