Generate an image of the Moon based on the given parameters.
Generate Moon Phase
The API currently supports outputting images in
pngformats. These can be used in different use cases, depending on how and where you want them to be displayed.
Valid values are
shaded.Below are sample moons for each value.
Background style supports the values either
starswill render a stars background while
solidwill render the background with a solid color specified by the
These properties could be used to customize the image further. Colors could be defined as hex or as any of the 140 html color names.
The type parameter in the view object should specify which template to be used when rendering the image. Currently two templates are available.
Orientation parameter in the view object, determines which orientation to use when rendering the moon. By default it will render north side up, as seen by an observer facing the south side of the sky. This parameter is optional.
Below is an example of the same image with different orientations.