Package tech.mgl.core.utils.random
Class MGL_ColorUtils
java.lang.Object
tech.mgl.core.utils.random.MGL_ColorUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Color随机获取颜色(默认范围 0-255)static ColorgetRandomColor(int max) 随机获取颜色(指定最大值)static ColorgetRandomColor(int fc, int bc) 随机获取颜色,给定范围获得随机颜色
-
Constructor Details
-
MGL_ColorUtils
public MGL_ColorUtils()
-
-
Method Details
-
getRandomColor
随机获取颜色,给定范围获得随机颜色- Parameters:
fc- 最小颜色值 (0-255)bc- 最大颜色值 (0-255)- Returns:
- Color 对象
-
getRandomColor
随机获取颜色(默认范围 0-255)- Returns:
- Color 对象
-
getRandomColor
随机获取颜色(指定最大值)- Parameters:
max- 最大值(0-255)- Returns:
- 随机颜色对象
-