You can use. String hex = String.format("#%02x%02x%02x", r, g, b);. Use capital X's if you want your resulting hex-digits to be capitalized ...
確定! 回上一頁