From e6d5a919ade2b070a34f40683c8664b684f76cde Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 7 Oct 2005 10:24:56 +0000 Subject: [PATCH] comma separated rgb values --- src/jalview/schemes/UserColourScheme.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); } -- 1.7.10.2