Class MGL_ColorUtils

java.lang.Object
tech.mgl.core.utils.random.MGL_ColorUtils

public class MGL_ColorUtils extends Object
  • Constructor Details

    • MGL_ColorUtils

      public MGL_ColorUtils()
  • Method Details

    • getRandomColor

      public static Color getRandomColor(int fc, int bc)
      随机获取颜色,给定范围获得随机颜色
      Parameters:
      fc - 最小颜色值 (0-255)
      bc - 最大颜色值 (0-255)
      Returns:
      Color 对象
    • getRandomColor

      public static Color getRandomColor()
      随机获取颜色(默认范围 0-255)
      Returns:
      Color 对象
    • getRandomColor

      public static Color getRandomColor(int max)
      随机获取颜色(指定最大值)
      Parameters:
      max - 最大值(0-255)
      Returns:
      随机颜色对象