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

Method colorToRGBString

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

Provides string from a Color which can be passed to Color.valueOf @param color color to convert

(final Color color)

Source from the content-addressed store, hash-verified

36 * @param color color to convert
37 */
38 public static String colorToRGBString(final Color color)
39 {
40 return String.format(
41 "#%02X%02X%02X",
42 (int) (color.getRed() * 255),
43 (int) (color.getGreen() * 255),
44 (int) (color.getBlue() * 255)
45 );
46 }
47
48 /**
49 *

Callers 3

setColorMethod · 0.95
initColorMethod · 0.95
appendCampaignInfoMethod · 0.95

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected