How to get color-int from alpha, red, green, blue components in Android Studio?

Android system's android.graphics.Color class provide methods for creating and converting color ints. 

* public static int argb (int alpha, int red, int green, int blue) 
Return a color-int from alpha, red, green, blue components. These component values should be [0..255], but there is no range check performed, so if they are out of range, the returned color is undefined. 

*public static int rgb (int red, int green, int blue) 
Return a color-int from red, green, blue components. The alpha component is implicity 255 (fully opaque). These component values should be [0..255], but there is no range check performed, so if they are out of range, the returned color is undefined.


Comments

  1. Casinos & Gaming in 2021 | DRMCD
    Find Casinos & Gaming, Hotels 충청남도 출장샵 & Resorts and more at DRMCD. Casino, 영주 출장안마 Hotel 밀양 출장샵 & 강원도 출장마사지 Gambling & Casinos, 삼척 출장마사지 Hotel, Gambling & Gaming.

    ReplyDelete

Post a Comment