Java Byte Create toByteColor(int i)

Here you can find the source of toByteColor(int i)

Description

integer color to byte color.

License

Minecraft Mod Public

Parameter

Parameter Description
i integer color

Return

byte color

Declaration

public static byte toByteColor(int i) 

Method Source Code

//package com.java2s;
/*// ww  w.  jav a  2s  .com
 * AwA Minecraft's mod commons.
 *
 * (c) 2013 alalwww
 * https://github.com/alalwww
 *
 * This library is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL.
 * Please check the contents of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt
 *
 * ????????????????Minecraft Mod Public License (MMPL) 1.0 ?????????????????????????????????????
 * ??????????????????????????????????????????? http://www.mod-buildcraft.com/MMPL-1.0.txt
 */

public class Main {
    /**
     * integer color to byte color.
     * 
     * @param i
     *            integer color
     * @return byte color
     */
    public static byte toByteColor(int i) {
        return (byte) ((i >>> 0) & 0xFF);
    }
}

Related

  1. toByte(String value)
  2. toByte(T value)
  3. toByteBE(int value, byte[] dst, int offset)
  4. toByteByAddress(String address)
  5. toByteByHex(String address)
  6. toByteFromBin(String binSymbols)
  7. toByteMatrix(Number[][] matrix)
  8. toByteObject(String value, Byte defaultValue)
  9. toByteUnit(long values)