Here you can find the source of toColor(byte[] bytes)
public static Color toColor(byte[] bytes)
//package com.java2s; /******************************************************************************* * Copyright (c) 2013 Shuichi Miura./*from ww w . j av a2 s . c om*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Shuichi Miura - initial API and implementation ******************************************************************************/ import java.awt.Color; public class Main { public static Color toColor(byte[] bytes) { return new Color((int) bytes[0], (int) bytes[1], (int) bytes[2], (int) bytes[3]); } }