private static Color parseRgbaColor(String rgbaString) {
		String value = rgbaString.replaceAll(" ", "");
		if (value.startsWith("rgba(") && value.endsWith(")")) {
			value = value.substring(5, value.length() - 1);
		}

		// strip off to comma separated values
		value = value.replaceAll(" ", "");
		String[] split = value.split(",");
		if (split.length != 4) {
			return null;
		}
		try {
			int red = Integer.parseInt(split[0]);
			int green = Integer.parseInt(split[1]);
			int blue = Integer.parseInt(split[2]);
			int alpha = parseAlpha(split[3]);
			return new Color(red, green, blue, alpha);
		}
		catch (IllegalArgumentException e) {
			return null;
		}
	}
Parses the given string into a color. The string must be in one of the following formats:
<pre>
rgb(red, green, blue)
rgb(red, green, blue, alpha)
</pre>
Each of the values "red", "green", "blue", and "alpha" must be integer values between 0-255
<br><br>
@param rgbString the string to parse into a color.
@return the parsed Color or null if the input string was invalid.
Ghidra/Framework/Gui/src/main/java/ghidra/util/WebColors.java