Class GoogleEarthColor

java.lang.Object
org.deltava.util.color.GoogleColor
org.deltava.util.color.GoogleEarthColor

public class GoogleEarthColor extends GoogleColor
A class to define Google Earth colors.
Since:
1.0
Version:
7.0
Author:
Luke
  • Constructor Details

    • GoogleEarthColor

      public GoogleEarthColor(int red, int green, int blue, int alpha)
      Creates a Google Earth color.
      Parameters:
      red - the RGB red value
      green - the RGB green value
      blue - the RGB blue value
      alpha - the transparency value
    • GoogleEarthColor

      public GoogleEarthColor(int red, int green, int blue)
      Creates a Google Earth color with default semi-transparency (128).
      Parameters:
      red - the RGB red value
      green - the RGB green value
      blue - the RGB blue value
  • Method Details

    • dim

      public GoogleEarthColor dim(float factor)
      Dims the color.
      Parameters:
      factor - the factor to divide all intensities by
      Returns:
      a dimmed clone of the color
    • toString

      public String toString()
      Renders the color to a string, suitable for insertion in KML documents.
      Overrides:
      toString in class Object
      Returns:
      the KML-formatted color value