Java Color Convert To colorToStringHex(int red, int green, int blue)

Here you can find the source of colorToStringHex(int red, int green, int blue)

Description

color To String Hex

License

Open Source License

Declaration

public static String colorToStringHex(int red, int green, int blue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String colorToStringHex(int red, int green, int blue) {
        //@formatter:off
        return Integer.toHexString(0xF & red >> 4) + Integer.toHexString(0x0F & red)
                + Integer.toHexString(0xF & green >> 4) + Integer.toHexString(0x0F & green)
                + Integer.toHexString(0xF & blue >> 4) + Integer.toHexString(0x0F & blue);
        //@formatter:on            
    }// ww  w  .  ja va 2 s.co m
}

Related

  1. colorToFloat(int color)
  2. colorToHex(int color)
  3. colorToHex(int integer)
  4. colorToRGB(final int alpha, final int red, final int green, final int blue)
  5. colorToString(int color, boolean rgb)