Class ColorUtils


  • public class ColorUtils
    extends java.lang.Object
    Contains a method to generate N visually distinct colors and helper methods.
    Author:
    Melinda Green
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Color[] generateVisuallyDistinctColors​(int ncolors, float minComponent, float maxComponent)  
      static void hsv2rgb​(float h, float s, float v, float[] rgb)  
      static void rgb2yuv​(float r, float g, float b, float[] yuv)  
      static void yuv2rgb​(float y, float u, float v, float[] rgb)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hsv2rgb

        public static void hsv2rgb​(float h,
                                   float s,
                                   float v,
                                   float[] rgb)
      • yuv2rgb

        public static void yuv2rgb​(float y,
                                   float u,
                                   float v,
                                   float[] rgb)
      • rgb2yuv

        public static void rgb2yuv​(float r,
                                   float g,
                                   float b,
                                   float[] yuv)
      • generateVisuallyDistinctColors

        public static java.awt.Color[] generateVisuallyDistinctColors​(int ncolors,
                                                                      float minComponent,
                                                                      float maxComponent)