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

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

settextcolor[edit]

settextcolor { color <vector> }

Set the color of the text for Celestia messages and scripting messages to the given RGB color (i.e. for the print command).


Notes:

  1. This method can be very useful when you zoom in on bright objects (i.e. the Sun or Mercury). When your screen is filled with the object, standard white text messages are very difficult to read. In that case changing the text color may help improve the readability of text messages.
  2. It is not possible to change the text color within the same text message.


Arguments:

color <vector>
Defines the components of the RGB values [Red Green Blue] of the color to be applied to the messages, as a vector.
Values must be between 0 and 1. Default is [1 0 0].


CELX equivalent:

Based on the 1.6.1 celestia:settextcolor() method.

  • Set the color for messages to the given RGB values in <vector>.
celestia:settextcolor(<R>, <G>, <B>)


Example:
Set text color for Celestia and scripting messages to green.

CEL:

settextcolor{ color [ 0 1 0 ] }

CELX:

celestia:settextcolor(0, 1, 0)


Back to CEL command index