[comp.sys.atari.st] Spectrum 512 palettes

fuhrhop@fokus.berlin.gmd.dbp.DE ("C.Fuhrhop ") (12/06/89)

I'm trying to convert some pictures to Spectrum 512 format.
I'm using the information from the "ST Picture Formats" list from
Dave Baggett:
Spectrum 512 (uncompressed)
80 words     first scan line of picture (unused) -- should be zeroes
15920 words  picture data (screen memory) for scan lines 1 through 199
9552 words   3 palettes for each scan line (the top scan line is 
             not included because Spectrum 512 can't display it)
51104 bytes total

Unfortunatly the pictures I get into SpecTrum 512 have got the wrong   
colors. Could anyone enlighten me why there are three palettes for each
line and how they are used by Spectrum?
Are the colors in all lines in Spectrum independent?  
Are there 16 different colors per line? 14? 48?

Confused
C.Fuhrhop