Here you can find the source of toRGB(Color c)
Parameter | Description |
---|---|
c | the color |
public static String toRGB(Color c)
//package com.java2s; //License from project: Open Source License import java.awt.Color; public class Main { /**/* w ww.j ava 2s . c o m*/ * convert this color as "rgb(red,green,blue)" * @param c the color * @return null if c is null or the rgb string */ public static String toRGB(Color c) { if (c == null) return null; return "rgb(" + c.getRed() + "," + c.getGreen() + "," + c.getBlue() + ")"; } }