Class ColorCache

java.lang.Object
dev.cerus.maps.api.graphics.ColorCache

public class ColorCache extends Object
Lazy cache that maps rgb values to map colors
  • Method Details

    • rgbToMap

      public static byte rgbToMap(int r, int g, int b)
      Retrieves a cached color. If the color is not cached it will be calculated and then cached.

      Takes up 16MB of memory when full

      Parameters:
      r - Red value
      g - Green value
      b - Blue value
      Returns:
      Cached map color