code: protected Color parseRGB(String value)
      {
          StringTokenizer items = new StringTokenizer(value, ",");
  
          try {
              int red = 0;
              if (items.hasMoreTokens()) {
                  red = Integer.parseInt(items.nextToken().trim());
              }
  
              int green = 0;
              if (items.hasMoreTokens()) {
                  green = Integer.parseInt(items.nextToken().trim());
              }
  
              int blue = 0;
              if (items.hasMoreTokens()) {
                  blue = Integer.parseInt(items.nextToken().trim());
              }
  
              return new Color(red, green, blue);
          } catch (NumberFormatException ex) {
              throw new ConversionException(value + "is not a valid RGB colo", ex);
          }
      }
docs: Parsers a String in the form "x, y, z" into an SWT RGB class.
  
  @param value the color as String
  @return RGB