format({color = 'dim', diffColor = 'cyan', previousVersion} = {}) {
		if (typeof previousVersion === 'string') {
			const previousSemver = semver.parse(previousVersion);

			if (previousSemver === null) {
				throw new Error(`Previous version ${previousVersion} should be a valid SemVer version.`);
			}

			previousVersion = previousSemver;
		}

		if (!this.#diff) {
			if (!previousVersion) {
				return chalk(`{${color} ${this.toString()}}`);
			}

			this.#diff = semver.diff(previousVersion, this.#version);
		}

		const {major, minor, patch, prerelease} = this.#version;
		const previousPrerelease = semver.prerelease(previousVersion);

		if (prerelease && previousPrerelease) {
			const prereleaseDiff = formatFirstDifference(prerelease, previousPrerelease, diffColor);
			return chalk(`{${color} ${major}.${minor}.${patch}-${prereleaseDiff}}`);
		}

		/* eslint-disable indent, unicorn/no-nested-ternary, operator-linebreak, no-multi-spaces */
		return (
			this.#diff === 'major'      ? chalk(`{${color} {${diffColor} ${major}}.${minor}.${patch}}`) :
			this.#diff === 'minor'      ? chalk(`{${color} ${major}.{${diffColor} ${minor}}.${patch}}`) :
			this.#diff === 'patch'      ? chalk(`{${color} ${major}.${minor}.{${diffColor} ${patch}}}`) :
			this.#diff === 'premajor'   ? chalk(`{${color} {${diffColor} ${major}}.${minor}.${patch}-{${diffColor} ${prerelease.join('.')}}}`) :
			this.#diff === 'preminor'   ? chalk(`{${color} ${major}.{${diffColor} ${minor}}.${patch}-{${diffColor} ${prerelease.join('.')}}}`) :
			this.#diff === 'prepatch'   ? chalk(`{${color} ${major}.${minor}.{${diffColor} ${patch}}-{${diffColor} ${prerelease.join('.')}}}`) :
			this.#diff === 'prerelease' ? chalk(`{${color} ${major}.${minor}.${patch}-{${diffColor} ${prerelease.join('.')}}}`) : ''
		);
		/* eslint-enable indent, unicorn/no-nested-ternary, operator-linebreak, no-multi-spaces */
	}
Formats the current version with `options.color`, pretty-printing the version's diff with `options.diffColor` if possible.

	If the current version has never been changed, providing `options.previousVersion` will allow pretty-printing the diff. It must be provided to format diffs between `prerelease` versions.

	@param {object} options
	@param {ColorName} [options.color = 'dim']
	@param {ColorName} [options.diffColor = 'cyan']
	@param {string} [options.prereleasePrefix]
	@returns {string} A color-formatted version string.