Color Index Mode

Hi there! Does anyone know how to obtain the maximum index of the supported palette? My book just says it’s a power of 2

thanks,

Kai