scream4040
Grünschnabel
Leute ich brauche eure hilfe wie kann ich ein programm schreiben das die rgb farben auf cymk farben konvertiert ich habe was geschrieben weiss aber nicht ob das so ok ist
ich habe ein witeres problem wie kann ich das programm aufrufen und zwar soll der aufruf folgendermaßen aussehen
c:/java RGBtoCYMK 75 0 130
ich verstehe nicht wo und wie ich das machen muss (alles ohne if bedingung)
public static void main(String[] args) {
float r = Float.parseFloat(args[0]);
float g = Float.parseFloat(args[1]);
float b = Float.parseFloat(args[2]);
float t = Math.max (r,g);
float max = Math.max(t,b);
double w = (max/255);
double c = ((w-(r/255))/w);
double m = ((w-(g/255))/w);
double y = ((w-(b/255))/w);
double k = (1-w);
System.out.println("cyan ="+c);
System.out.println("magenta ="+m);
System.out.println("yellow ="+y);
System.out.println("black ="+k);
}
ich habe ein witeres problem wie kann ich das programm aufrufen und zwar soll der aufruf folgendermaßen aussehen
c:/java RGBtoCYMK 75 0 130
ich verstehe nicht wo und wie ich das machen muss (alles ohne if bedingung)
public static void main(String[] args) {
float r = Float.parseFloat(args[0]);
float g = Float.parseFloat(args[1]);
float b = Float.parseFloat(args[2]);
float t = Math.max (r,g);
float max = Math.max(t,b);
double w = (max/255);
double c = ((w-(r/255))/w);
double m = ((w-(g/255))/w);
double y = ((w-(b/255))/w);
double k = (1-w);
System.out.println("cyan ="+c);
System.out.println("magenta ="+m);
System.out.println("yellow ="+y);
System.out.println("black ="+k);
}