text: export function parseColor(color, toNumber) {
      if (toNumber === true) {
          if (typeof color === 'number') {
              return (color | 0); //chop off decimal
          }
          if (typeof color === 'string' && color[0] === '#') {
              color = color.slice(1);
          }
          return parseInt(color, 16);
      } else {
          if (typeof color === 'number') {
              color = '#' + ('00000' + (color | 0).toString(16)).substr(-6); //pad
          }
          return color;
      }
  };
  