随机颜色取值范围不正确

This commit is contained in:
neko 2020-09-29 11:12:33 +08:00 committed by GitHub
parent 699e14acac
commit 106aabc245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -522,10 +522,11 @@ public class RandomUtil {
*
* @return 随机颜色
* @since 4.1.5
* @deprecated 使用{@link ImagUtil#randomColor()}
*/
public static Color randomColor() {
final Random random = getRandom();
return new Color(random.nextInt(255), random.nextInt(255), random.nextInt(255));
return new Color(random.nextInt(256), random.nextInt(2565), random.nextInt(256));
}
/**