// Path: e-paper-client-api/src/main/java/fr/romainmoreau/epaper/client/api/Color.java
// public enum Color {
// 	BLACK, DARK_GRAY, LIGHT_GRAY, WHITE;
// }
// 
// Path: e-paper-client-api/src/main/java/fr/romainmoreau/epaper/client/api/DrawingColors.java
// public class DrawingColors {
// 	private final Color foreground;
// 
// 	private final Color background;
// 
// 	public DrawingColors(Color foreground, Color background) {
// 		this.foreground = foreground;
// 		this.background = background;
// 	}
// 
// 	public Color getForeground() {
// 		return foreground;
// 	}
// 
// 	public Color getBackground() {
// 		return background;
// 	}
// }


import fr.romainmoreau.epaper.client.api.Color;
import fr.romainmoreau.epaper.client.api.DrawingColors;
package fr.romainmoreau.epaper.client.common.uart;


public class ColorsUART {
	public static DrawingColors getDrawingColors(byte[] response) {
		return new DrawingColors(getColor(response[0]), getColor(response[1]));
	}

// Path: e-paper-client-api/src/main/java/fr/romainmoreau/epaper/client/api/Color.java
// public enum Color {
// 	BLACK, DARK_GRAY, LIGHT_GRAY, WHITE;
// }
// 
// Path: e-paper-client-api/src/main/java/fr/romainmoreau/epaper/client/api/DrawingColors.java
// public class DrawingColors {
// 	private final Color foreground;
// 
// 	private final Color background;
// 
// 	public DrawingColors(Color foreground, Color background) {
// 		this.foreground = foreground;
// 		this.background = background;
// 	}
// 
// 	public Color getForeground() {
// 		return foreground;
// 	}
// 
// 	public Color getBackground() {
// 		return background;
// 	}
// }


// Path: e-paper-client-common-uart/src/main/java/fr/romainmoreau/epaper/client/common/uart/ColorsUART.java
import fr.romainmoreau.epaper.client.api.Color;
import fr.romainmoreau.epaper.client.api.DrawingColors;

package fr.romainmoreau.epaper.client.common.uart;


public class ColorsUART {
	public static DrawingColors getDrawingColors(byte[] response) {
		return new DrawingColors(getColor(response[0]), getColor(response[1]));
	}

	private static Color getColor(byte value) {