public
class
RandomColor
{
public
static
void
main
(String[] args)
{
Random
random
=
new
Random
();
int
r
=
random.nextInt(
256
);
int
g
=
random.nextInt(
256
);
int
b
=
random.nextInt(
256
);
Color
color
=
new
Color
(r, g, b);
System.out.println(
"随机生成的颜色:"
+ color);
皮卡皮卡_223