code: function checkSetFormat(color, convertToStr) {
          if ((/^0x/).test(color)) {
              return _0xColorToHex(color, convertToStr);
          }
          if (convertToStr) {
              return tinycolor(color).toString();
          }
          return tinycolor(color);
      }
docs: Ensures that a string is in Tinycolor supported format
  @param {string} color - Color to check the format for
  @param {boolean} convertToString - true if color should
  be returned as string
  @returns {tinycolor|string} - Color as a Tinycolor object
  or a hex string