convert enum PaletteCommand into enum class