Java RGB Color Convert To rgbToHex(int[] rgb)

Here you can find the source of rgbToHex(int[] rgb)

Description

rgb To Hex

License

Open Source License

Declaration

public static String rgbToHex(int[] rgb) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2014,2015 Hideki Yatomi
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/

public class Main {
    public static String rgbToHex(int[] rgb) {
        return String.format("%02x%02x%02x", rgb[0], rgb[1], rgb[2]);
    }/*from   w  ww  . j a va2  s .c o  m*/
}

Related

  1. RgbToGray(int r, int g, int b)
  2. rgbToGrey(byte[] rgb)
  3. rgbToHex(final int r, final int g, final int b)
  4. rgbToHex(int r, int g, int b)
  5. RGBtoHex(int r, int g, int b)
  6. RGBToHex(int[] rgb)
  7. rgbToHex(String color)
  8. RGBtoHSB(int r, int g, int b, float hsbvals[])
  9. RGBtoHSB(int r, int g, int b, float[] hsbvals)