I have some color, coded in RGB
format: 121E31 hex
. How do I pass this color to Java's Color
class ?
这通常使用解码完成:
Color color = Color.decode("0x121E31");
The RGB value of your "121E31" color is : 18,30,49
For this refer http://www.yellowpipe.com/yis/tools/hex-to-rgb/color-converter.php
Now this RGB value can be added using java class as follows
Color c = new Color(18,30,49);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.