packages/server-web/src/client/socket.io-bundle.js
function selectColor(namespace) {
    var hash = 0,
      i;

    for (i in namespace) {
      hash = (hash << 5) - hash + namespace.charCodeAt(i);
      hash |= 0; // Convert to 32bit integer
    }

    return exports.colors[Math.abs(hash) % exports.colors.length];
  }
function selectColor(namespace) {
    var hash = 0,
      i;

    for (i in namespace) {
      hash = (hash << 5) - hash + namespace.charCodeAt(i);
      hash |= 0; // Convert to 32bit integer
    }

    return exports.colors[Math.abs(hash) % exports.colors.length];
  }
function selectColor ( namespace ) { var hash = 0 , i ; for ( i in namespace ) { hash = ( hash << 5 ) - hash + namespace . charCodeAt ( i ) ; hash |= 0 ; // Convert to 32bit integer } return exports . colors [ Math . abs ( hash ) % exports . colors . length ] ; }
Select a color.
@param {String} namespace
@return {Number}
@api private
Select a color .