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

From Wikibooks, open books for an open world
Jump to navigation Jump to search

setlabelcolor[edit | edit source]

setlabelcolor { item <labelstring> color <vector> }

Set the color of labels to the given RGB color.


Arguments:

item <labelstring>
A string describing the label of which the color must change. Must be one of:
  • asteroids
  • comets
  • constellations
  • dwarfplanets
  • eclipticgrid
  • equatorialgrid
  • galacticgrid
  • galaxies
  • globulars
  • horizontalgrid
  • locations
  • minormoons
  • moons
  • nebulae
  • openclusters
  • planetographicgrid
  • planets
  • spacecraft
  • stars
color <vector>
Defines the components of the RGB values [Red Green Blue] of the color to be applied to the labels, as a vector.
Values must be between 0 and 1. Default is [1 0 0].


CELX equivalent:

Based on the 1.5.0 celestia:setlabelcolor() method.

  • Set the color for labels of <labelstring> to the given RGB values in <vector>.
celestia:setlabelcolor(<labelstring>, <R>, <G>, <B>)


Example:
Set the label color for stars to RED and turn star labels on.

CEL:

setlabelcolor { item "stars" color [ 1 0 0 ] }
labels { set "stars" }

CELX:

celestia:setlabelcolor("stars", 1, 0, 0)
celestia:setlabelflags{stars = true}


Back to CEL command index