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

rgb code from java color

String.format("#%06x", color.getRGB() & 0x00FFFFFF)
Comment

PREVIOUS NEXT
Code Example
Java :: java bfs 
Java :: regex s+ 
Java :: java loops 
Java :: android convert date to local timezone 
Java :: java creating a stack 
Java :: java array get index 
Java :: check if duplicate element in java 
Java :: creating an array list in java 
Java :: android studio reg get float from numeric string 
Java :: Java Access PriorityQueue Elements 
Java :: java array of array 
Java :: How to implement the A* shortest path algorithm, in Java? 
Java :: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config 
Java :: sorting methods in java 
Java :: java android build secret keys 
Java :: how to use enumUtils in java 
Java :: quebra de linha java 
Java :: find the unique element in a list java 
Java :: how to create a subclass in java 
Java :: Implementing the Vector Class in java list 
Java :: how to store date in java 
Java :: arraylist to primitive array 
Java :: return class name java 
Java :: Explain try & catch finally block in Java 
Java :: 7877777777777777777777777 
Java :: get width and height of screen libgdx 
Java :: java enum to string 
Java :: map.keyset in java 
Java :: stream filter java 8 
Java :: java confirmation dialog 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =