Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Java rgb to color

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 :: write content to file java 
Java :: java run jar with args 
Java :: queue and stack reader 
Java :: final vs static keyword in java 
Java :: abstract method declaration 
Java :: java set classpath 
Java :: Java Thread Example by implementing Runnable interface 
Java :: flutter unable to find bundled java version 
Java :: How to activate an entity listener for all entities 
Java :: what is constructor in java 
Java :: array of arrays java 
Java :: could not find java; set JAVA_HOME or ensure java is in PATH 
Java :: javafx edit list 
Java :: jdialog middle of screen 
Java :: how to pass a float between activities in android studio 
Java :: could not find java in a java_home at /opt/java/openjdk/bin/java docker sonarqube 
Java :: minecraft fabric client message 
Java :: how to run a java file in terminal 
Java :: Java boolean Keyword 
Java :: compress a directory in java 
Java :: check if LinkedList is empyth java 
Java :: java make object 
Java :: java selection sort 
Java :: java system.out.println shortcut 
Java :: switch en java 
Java :: close GUI in jvava 
Java :: change fab image programatically 
Java :: java swing draw centered text 
Java :: java split on { 
Java :: abstract class java constructor 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =