Skip to content

Commit

Permalink
expose the rgb raw values to Color support class via java.awt.Color
Browse files Browse the repository at this point in the history
Fixes ##2317
  • Loading branch information
lukeis committed Jun 20, 2016
1 parent a1b3b47 commit 02e40f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions java/client/src/org/openqa/selenium/support/Color.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public String asHex() {
return String.format("#%02x%02x%02x", red, green, blue);
}

/**
* @return a java.awt.Color class instance
*/
public java.awt.Color getColor() {
return new java.awt.Color((float)red, (float)green, (float)blue, (float)alpha);
}

@Override
public String toString() {
return "Color: " + asRgba();
Expand Down

0 comments on commit 02e40f1

Please sign in to comment.