Java Hex Calculate toHex(int r, int g, int b)

Here you can find the source of toHex(int r, int g, int b)

Description

to Hex

License

Open Source License

Declaration

public static int toHex(int r, int g, int b) 

Method Source Code

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

public class Main {
    public static int toHex(int r, int g, int b) {
        int hex = 0;
        hex = hex | ((r) << 16);//from w w  w.j a  v  a2 s.c o  m
        hex = hex | ((g) << 8);
        hex = hex | ((b));
        return hex;
    }
}

Related

  1. toHex(int n, int s)
  2. toHex(int nibble)
  3. toHex(int num)
  4. toHex(int nybble)
  5. toHex(int r, int g, int b)
  6. toHex(int r, int g, int b)
  7. toHex(int v)
  8. toHex(int val)
  9. toHex(int val)