Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Java get color from rgb values

public int getIntFromColor(int Red, int Green, int Blue){
    Red = (Red << 16) & 0x00FF0000; //Shift red 16-bits and mask out other stuff
    Green = (Green << 8) & 0x0000FF00; //Shift Green 8-bits and mask out other stuff
    Blue = Blue & 0x000000FF; //Mask out anything not blue.

    return 0xFF000000 | Red | Green | Blue; //0xFF000000 for 100% Alpha. Bitwise OR everything together.
}
Comment

PREVIOUS NEXT
Code Example
Java :: Java LogManager 
Java :: reverse loop in java 
Java :: stringbuilder java 
Java :: iterate over multi array java 
Java :: Simple While Loop Java Example 
Java :: combinations in java 
Java :: how to convert iso-8859-1 to utf-8 in java 
Java :: replace all these caracters in string java 
Java :: a?che les paramètres de la ligne de commande triés par ordre lexicographique en java 
Java :: how to make a text field required in android studio 
Java :: How to summon an item in bukkit 
Java :: how to send http post create request using curl command 
Java :: framboise bleue ou mure 
Java :: Error: Could not find or load main class Main Caused by: java.lang.ClassNotFoundException: Main 
Java :: erstelle hashmap java 
Java :: bukkit random 
Java :: get current background color of TextView java 
Java :: dockerfile spring boot 
Java :: transparent card background android 
Java :: how to check when edittext clicked android 
Java :: java Detect Cycle in a Directed Graph 
Java :: reverse arraylist java recursion 
Java :: remove selected text from string value android java 
Java :: spring boot api key authentication example 
Java :: Big decimal example 
Java :: java clear scanner2 
Java :: java enum strings 
Java :: java null 
Java :: java exception override message 
Java :: Traversing through java map foreach 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =