From: amwaterhouse Date: Fri, 7 Oct 2005 10:24:56 +0000 (+0000) Subject: comma separated rgb values X-Git-Tag: Release_2_07~61 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e6d5a919ade2b070a34f40683c8664b684f76cde;p=jalview.git comma separated rgb values --- diff --git a/src/jalview/schemes/UserColourScheme.java b/src/jalview/schemes/UserColourScheme.java index 660441e..4b963fe 100755 --- a/src/jalview/schemes/UserColourScheme.java +++ b/src/jalview/schemes/UserColourScheme.java @@ -38,6 +38,16 @@ public class UserColourScheme col = ColourSchemeProperty.getAWTColorFromName(colour); if(col==null) + {try{ + java.util.StringTokenizer st = new java.util.StringTokenizer(colour, ","); + int r = Integer.parseInt( st.nextToken() ); + int g = Integer.parseInt( st.nextToken() ); + int b = Integer.parseInt( st.nextToken() ); + col = new Color(r,g,b); + }catch(Exception ex){} + } + + if(col==null) { System.out.println("Unknown colour!! "+colour); }