import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
public class ColorCreate {
public static void main(String[] args) {
Display display = new Display();
RGB rgb = new RGB(255, 0, 0); // pure red
Color color = new Color(display, rgb);
System.out.println(color.getBlue());
display.dispose();
}
}
|