MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / fromString

Method fromString

java/src/org/openqa/selenium/support/Color.java:48–57  ·  view source on GitHub ↗
(String value)

Source from the content-addressed store, hash-verified

46 * Guesses what format the input color is in.
47 */
48 public static Color fromString(String value) {
49 for (Converter converter : CONVERTERS) {
50 Color color = converter.getColor(value);
51 if (color != null) {
52 return color;
53 }
54 }
55 throw new IllegalArgumentException(
56 String.format("Did not know how to convert %s into color", value));
57 }
58
59 public Color(int red, int green, int blue, double alpha) {
60 this.red = red;

Callers 15

assertBackgroundColorMethod · 0.95
assertBackgroundColorMethod · 0.95
rgbToRgbMethod · 0.95
rgbToRgbaMethod · 0.95
rgbPctToRgbaMethod · 0.95
rgbAllowsWhitespaceMethod · 0.95
rgbaToRgbaMethod · 0.95
rgbaPctToRgbaMethod · 0.95
hexToHexMethod · 0.95

Calls 2

getColorMethod · 0.45
formatMethod · 0.45

Tested by 15

assertBackgroundColorMethod · 0.76
assertBackgroundColorMethod · 0.76
rgbToRgbMethod · 0.76
rgbToRgbaMethod · 0.76
rgbPctToRgbaMethod · 0.76
rgbAllowsWhitespaceMethod · 0.76
rgbaToRgbaMethod · 0.76
rgbaPctToRgbaMethod · 0.76
hexToHexMethod · 0.76