I\'ve got some ugly scriptlistener code that converts an RGB image to index colour. (Image > Mode > Index color)
// SCRIPT LISTENER var idCnvM = charIDT