Skip to content

Commit 02e40f1

Browse files
committed
expose the rgb raw values to Color support class via java.awt.Color
Fixes ##2317
1 parent a1b3b47 commit 02e40f1

File tree

1 file changed

+7
-0
lines changed
  • java/client/src/org/openqa/selenium/support

1 file changed

+7
-0
lines changed

java/client/src/org/openqa/selenium/support/Color.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ public String asHex() {
8585
return String.format("#%02x%02x%02x", red, green, blue);
8686
}
8787

88+
/**
89+
* @return a java.awt.Color class instance
90+
*/
91+
public java.awt.Color getColor() {
92+
return new java.awt.Color((float)red, (float)green, (float)blue, (float)alpha);
93+
}
94+
8895
@Override
8996
public String toString() {
9097
return "Color: " + asRgba();

0 commit comments

Comments
 (0)