sp.palette[num] = col; this.spal.setPalette(sp.getPalette());
if (usingMapPal) { if (num != 0) { TileEditor.Tileset ts = TileEditor.tilesets[tileset .getSelectedIndex()]; int pn = tilesetPal.getSelectedIndex(); int subpal = (ts.getPaletteColor(0, pn, 2).getRed() >> 3) - 2; ts.setPaletteColor(num, pn, subpal, col); Color[] tmp = ts.getPaletteColors(pn, subpal); tmp[0] = Sprite.pals[0][0]; this.spal.setPalette(tmp); } } else { sp.palette[num] = col; this.spal.setPalette(sp.getPalette()); }
    private void changePaletteCol(int num, Color col)    {        Sprite sp = new Sprite(getSpriteInfo(HackModule.getNumberOfString(            selector.getSelectedItem().toString(), false)), this);        sp.setImage(this.spriteDrawingArea.getIntArrImage());        sp.palette[num] = col;        this.spal.setPalette(sp.getPalette());        spal.repaint();        this.spriteDrawingArea.setImage(sp.getSprite());    }