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

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

setlinecolor[edit]

setlinecolor { item <linestring> color <vector> }

Set the color of lines to the given RGB color.


Arguments:

item <linestring>
A string describing the line of which the color must change. Must be one of:
  • starorbits
  • planetorbits
  • moonorbits
  • asteroidorbits
  • cometorbits
  • spacecraftorbits
  • constellations
  • boundaries
  • equatorialgrid
  • dwarfplanetorbits
  • minormoonorbits
  • planetographicgrid
  • planetequator
  • galacticgrid
  • eclipticgrid
  • horizontalgrid
  • ecliptic
color <vector>
Defines the components of the RGB values [Red Green Blue] of the color to be applied to the lines, as a vector.
Values must be between 0 and 1. Default is [1 0 0].


CELX equivalent:

Based on the 1.5.0 celestia:setlinecolor() method.

  • Set the color for lines of <linestring> to the given RGB values in <vector>.
celestia:setlinecolor(<linestring>, <R>, <G>, <B>)


Example:
Set the color of the galacticgrid to CYAN and turn galacticgrid on.

CEL:

setlinecolor { item "galacticgrid" color [ 0 1 1 ] }
renderflags { set "galacticgrid" }

CELX:

celestia:setlinecolor("galacticgrid", 0, 1, 1)
celestia:setrenderflags{galacticgrid = true}


Back to CEL command index