X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FColorUtils.java;h=4ba17d53b80c1493db98f27aac3d77870f2c0ab8;hb=65d6d09cd08743d481d39521bb0298ea683888f8;hp=31d1dedad331641c63e5da78df030bd8321c57d0;hpb=cb1244956d07a8233e6ff4e4f2e1db992f84f554;p=jalview.git diff --git a/src/jalview/util/ColorUtils.java b/src/jalview/util/ColorUtils.java index 31d1ded..4ba17d5 100644 --- a/src/jalview/util/ColorUtils.java +++ b/src/jalview/util/ColorUtils.java @@ -24,12 +24,18 @@ package jalview.util; +import jalview.api.ColorI; + import java.awt.Color; import java.util.Random; public class ColorUtils { + public static Color getColor(ColorI c) + { + return new Color(c.getRed(), c.getGreen(), c.getBlue()); + } /** * Generates a random color, will mix with input color. Code taken from * http://stackoverflow @@ -68,7 +74,7 @@ public class ColorUtils * ://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/colortool.html# * tkcode */ - public static final String toTkCode(Color colour) + public static final String toTkCode(ColorI colour) { String colstring = "#" + ((colour.getRed() < 16) ? "0" : "") + Integer.toHexString(colour.getRed())