Celestia/Celx Scripting/CELX Lua Methods/CEL command constellationcolor

constellationcolor edit

constellationcolor { set|clear <name> color <colorvector> }

Set the color of individual constellations defined in <name> to the given <vector> color,
-- OR --
Clear the color of individual constellations defined in <name> to the original Celestia color.

Note:

  1. Besides setting or clearing the color of the constellation(s), this command also takes effect on the constellation name(s).
  2. The renderflags { set "constellations" } command must be given prior to this command to enable rendering of constellations.

Arguments:

set <name> -- OR -- clear <name>
A string which contains the name of the constellation on which the color change is applied.
Spedial value "all", to set or reset the color of all the constellations at once.
Otherwise must be one (or more, separated by a space) of:
  • "Andromeda", "Antlia", "Apus", "Aquarius", "Aquila", "Ara", "Aries", "Auriga", "Boötes", "Caelum", "Camelopardalis", "Cancer", "Canes Venatici", "Canis Major", "Canis Minor", "Capricornus", "Carina", "Cassiopeia", "Centaurus", "Cepheus", "Cetus", "Chamaeleon", "Circinus", "Columba", "Coma Berenices", "Corona Australis", "Corona Borealis", "Corvus", "Crater", "Crux", "Cygnus", "Delphinus", "Dorado", "Draco", "Equuleus", "Eridanus", "Fornax", "Gemini", "Grus", "Hercules", "Horologium", "Hydra", "Hydrus", "Indus", "Lacerta", "Leo", "Leo Minor", "Lepus", "Libra", "Lupus", "Lynx", "Lyra", "Mensa", "Microscopium", "Monoceros", "Musca", "Norma", "Octans", "Ophiuchus", "Orion", "Pavo", "Pegasus", "Perseus", "Phoenix", "Pictor", "Pisces", "Piscis Austrinus", "Puppis", "Pyxis", "Reticulum", "Sagitta", "Sagittarius", "Scorpius", "Sculptor", "Scutum", "Serpens Caput", "Serpens Cauda", "Sextans", "Taurus", "Telescopium", "Triangulum", "Triangulum Australe", "Tucana", "Ursa Major", "Ursa Minor", "Vela", "Virgo", "Volans", "Vulpecula".
  • If the asterisms.dat file in the ..\celestia\data directory contains alternative asterisms and/or constellation names, the mentioned names in this file can be used too in this parameter.
color <vector> [optional]
Defines the components of the RGB values [Red Green Blue] of the color to be applied to the constellation(s), as a vector.
Values must be between 0 and 1. Default is [1 0 0].
This parameter is not needed and used when the constellation colors are cleared.

CELX equivalent:

Based on the 1.6.0 celestia:setconstellationcolor() method.

  • Define a table containing the name(s) <name> of the constellation(s) on which the color change must be applied.
table = {"name1", "name2"}
  • Extract the RGB values from <vector> and place them as parameter 1, 2 and 3 in the celestia:setconstellationcolor() method, followed by the constellation name(s) table as 4th parameter.
celestia:setconstellationcolor(<R>, <G>, <B>, table)

Summarized:

table = {"name1", "name2"}
celestia:setconstellationcolor(<R>, <G>, <B>, table)

Example:
Show all zodiacal constellations in yellow

CEL:

renderflags { set "constellations" }
constellationcolor { set  "Pisces Aries Taurus Gemini Cancer Leo Virgo Libra 
                           Scorpius Ophiuchus Sagittarius Capricornus Aquarius" color [1 1 0] }

CELX:

celestia:setrenderflags{constellations = true}
zodiac = {"Pisces", "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra",
          "Scorpius", "Ophiuchus", "Sagittarius", "Capricornus", "Aquarius"}
celestia:setconstellationcolor(1, 1, 0, zodiac)


Back to CEL command index