Colors in addtoshiplog function


When I use the player:addToShipLog("message to send to player","Red") function, I am able to use these colors: Red, Blue, Yellow, Magenta, Green, Cyan and Black. These look like the built in colors defined in SFML. The script reference says that the type is "sf::Color color" but I can't find an example on how to plug that value in to the lua script to get a specific color. I've tried several syntactical permutations, but all of them either default to white or quietly fail entirely.

Has anyone had experience passing SFML numeric colors? From what I can tell, it consists of four numbers corresponding to the (r)ed, (g)reen, (b)lue and (a)lpha parameters of a color. I've seen these specified as strings, of integers, hexadecimal numbers, with commas, without, in parentheses, in braces, etc.

An example would go a long way in explaining this function's use.



Sign In or Register to comment.