initFromString(rawText) {
		if (typeof rawText !== "string") {
			throw new Error(`invalid parameter '${rawText}' in Color constructor`);
		}

		const cleanedText = /[A-F0-9]{8}|[A-F0-9]{6}/g.exec(rawText)[0];

		let channelValues = [];

		for (let i = 0; i < cleanedText.length; i += 2) {
			channelValues.push(parseInt(cleanedText.slice(i, i+2), 16));
		}

		this.initFromChannels(...channelValues.reverse());
	}
/**
	 * 
	 * @param {string} rawText hex representation of color
	 */
@param {string} rawText hex representation of color
@param { string } rawText hex representation of color
initFromString(rawText) {
		if (typeof rawText !== "string") {
			throw new Error(`invalid parameter '${rawText}' in Color constructor`);
		}
		const cleanedText = /[A-F0-9]{8}|[A-F0-9]{6}/g.exec(rawText)[0];
		let channelValues = [];
		for (let i = 0; i < cleanedText.length; i += 2) {
			channelValues.push(parseInt(cleanedText.slice(i, i+2), 16));
		}
		this.initFromChannels(...channelValues.reverse());
	}
initFromString ( rawText ) { if ( typeof rawText !== "string" ) { throw new Error ( ` ${ rawText } ` ) ; } const cleanedText = / [A-F0-9]{8}|[A-F0-9]{6} / g . exec ( rawText ) [ 0 ] ; let channelValues = [ ] ; for ( let i = 0 ; i < cleanedText . length ; i += 2 ) { channelValues . push ( parseInt ( cleanedText . slice ( i , i + 2 ) , 16 ) ) ; } this . initFromChannels ( ... channelValues . reverse ( ) ) ; }
@param {string} rawText hex representation of color
@param { string } rawText hex representation of color