Starting git repo for working on files
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
public class CMYKtoRGB
|
||||
{
|
||||
public static void main(String [] args){
|
||||
double cyan = Double.parseDouble(args[0]);
|
||||
double magenta = Double.parseDouble(args[1]);
|
||||
double yellow = Double.parseDouble(args[2]);
|
||||
double black = Double.parseDouble(args[3]);
|
||||
|
||||
double white = 1 - black;
|
||||
double red = 255 * white * (1 - cyan);
|
||||
double green = 255 * white * (1 - magenta);
|
||||
double blue = 255 * white * (1 - yellow);
|
||||
|
||||
int decimal_red = (int) Math.round(red);
|
||||
int decimal_green = (int) Math.round(green);
|
||||
int decimal_blue = (int) Math.round(blue);
|
||||
|
||||
System.out.println("red = " + decimal_red);
|
||||
System.out.println("green = " + decimal_green);
|
||||
System.out.println("blue = " + decimal_blue);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user