void ParseLoadColorTable(SynchronizedLyricsItemBuilder sl, CdgPacket packet, bool higherTable) { int offset = higherTable ? 8 : 0; ARGB[] palette = new ARGB[8]; for (int i = 0; i < 8; i++) { byte r = (byte)((packet.Data[i * 2] & 0x3C) << 2); byte g = (byte)(((packet.Data[i * 2] & 0x03) << 6) | (packet.Data[(i * 2) + 1] & 0x30)); byte b = (byte)((packet.Data[(i * 2) + 1] & 0x0F) << 4); palette[i] = ARGB.FromColor(r, g, b); } sl.Commands.Add(new SlcReplacePaletteColors((byte)offset, palette)); }