Colors in Delphi?

Hi all!
I'm working on a 3D engine in Delphi and i'm trying to do flat shading,
for which I need a palette to shade with.
What I'm currently using is an array like this:
palette: Array [0..255,0..3] of longint, and it works just fine, but
I think it's an awful waste of memory (Right?). What I want it's some
way of having my own palette, so I can get rid of this array, but
I don't know what API functions I have to use or how to use them.

If anyone has some code or advice, or comments, or anything that
can help me, I would really appreciate it.

Thanks a lot.