package com.chenyang.nse.bussiness.tools.other;

import java.util.Random;

public class ColorTool {
   public static String randomColor() {
      Random random = new Random();
      String red = Integer.toHexString(random.nextInt(256)).toUpperCase();
      String green = Integer.toHexString(random.nextInt(256)).toUpperCase();
      String blue = Integer.toHexString(random.nextInt(256)).toUpperCase();
      red = red.length() == 1 ? "0" + red : red;
      green = green.length() == 1 ? "0" + green : green;
      blue = blue.length() == 1 ? "0" + blue : blue;
      String color = "#" + red + green + blue;
      return color;
   }
}
