handle transparency in indexed color