MCPcopy Create free account
hub / github.com/PCGen/pcgen / colorToAWTColor

Method colorToAWTColor

code/src/java/pcgen/gui3/utilty/ColorUtilty.java:53–65  ·  view source on GitHub ↗

@param color JavaFX color @return AWT color

(final Color color)

Source from the content-addressed store, hash-verified

51 * @return AWT color
52 */
53 @Nullable
54 public static java.awt.Color colorToAWTColor(final Color color)
55 {
56 if (color == null)
57 {
58 return null;
59 }
60 return new java.awt.Color(
61 (int) (color.getRed() * 255),
62 (int) (color.getGreen() * 255),
63 (int) (color.getBlue() * 255)
64 );
65 }
66
67}

Calls

no outgoing calls

Tested by

no test coverage detected