Skip to content

Commit 03f7646

Browse files
committed
adding utility method
1 parent 271e79e commit 03f7646

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/color

biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/color/ColorUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ public static void main(String[] args){
5353
//System.out.println(rotateHue(color, 0.1f));
5454
}
5555
}
56-
56+
57+
public static String toHexColor(Color col){
58+
return Integer.toHexString((col.getRGB() & 0xffffff) | 0x1000000).substring(1);
59+
}
60+
5761
/**
5862
* Rotate a color through HSB space
5963
* @param color Starting color

0 commit comments

Comments
 (0)