private static int parseAlpha(String string) {
		// alpha strings can either be a float between 0.0 and 1.0 or an integer from 0 to 255.
		// if it is a float, treat that value as a percentage of the 255 max value
		// if it is an int, don't allow the value to be bigger than 255.
		if (string.contains(".")) {
			float value = Float.parseFloat(string);
			return (int) (value * 0xff + 0.5) & 0xff;  // convert to value in range (0-255)
		}
		return Integer.parseInt(string) & 0xff;	// truncate any bits that would make it bigger than 255
	}
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