Color colorSpecial = new Color(50, 100, 150);
int red = colorSpecial .getRed();
int green = colorSpecial.getGreen();
int blue = colorSpecial.getBlue();
Color newColor = new Color(red, 0, 0);
int r = 255;
int g = 0;
int b = 0;
Color c1 = new Color(r,g,b);
int colorAsInt = c1.getRGB();
// .....
Color c2 = new Color(colorAsInt);
int r2 = c2.getRed();
int g2 = c2.getGreen();
int b2 = c2.getBlue();
int x;
int y;
BufferedImage image;
// -----
Color c = Color.RED;
int redAsInt = c.getRGB();
image.setRGB(x, y, redAsInt );
überbleibt es nach der dem Argument nicht genauso mir, meinen Hinweis zu posten?Mit überbleibt es zu fragen und zu entscheiden ob ich frage und ob es das Beste für mich ist.
Dir ob du antwortest (helfen willst). Wenn nicht brauchst du doch auch nicht.
Wo ist das Problem?
BufferedImage.setRGB(x,y,getRGB(..));
private int getRGB(double d) {
int gray = (int) (d * 255);
return (gray << 16) | (gray << 8) | gray;
}