Advertisement
CaptainSpaceCat

Color to RGB

Jul 28th, 2016
114
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.awt.Color;
  2. import java.util.Scanner;
  3.  
  4. class ColorTest {
  5.  
  6.   public static void main(String[] args) {
  7.     Scanner scan = new Scanner(System.in);
  8.    
  9.     int r = scan.nextInt();
  10.     int g = scan.nextInt();
  11.     int b = scan.nextInt();
  12.     System.out.println(new Color(r, g, b).getRGB());
  13.   }
  14.  
  15. }
Advertisement
RAW Paste Data Copied
Advertisement