add hasSubPalette and fix getSubPalette
rework active property generation