cakelight.turnOff();
System.out.println("stopping cakelight");
break;
+ } else if (input.matches("(c|col|color)(\\s+[0-9]+){3}")) {
+ String[] split = input.split("\\s+");
+ Color c = Color.rgb(
+ Integer.parseInt(split[1]),
+ Integer.parseInt(split[2]),
+ Integer.parseInt(split[3])
+ );
+ cakelight.setMode(new SingleColorMode(c));
+ System.out.println("setting color to " + c);
}
} catch (IOException e) {
System.out.println("Error reading from command line");