Answers for "make java color by rgb"

1

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.
}
Posted by: Guest on November-24-2021
0

rgb code from java color

String.format("#%06x", color.getRGB() & 0x00FFFFFF)
Posted by: Guest on October-31-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language