User Tools

Site Tools


color

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
color [2017/08/14 12:53] justincolor [2020/02/15 14:03] justin
Line 2: Line 2:
 ---- ----
  
-A **color** is a scripting data type that, as the name implies, represents an RGB color value and is written as //color[rgb]//. The R, G, and B values correspond to the intensity of the red, green, and blue elements of the color and can range from 0 to 255.+A **color** is a scripting data type that represents an RGB color value and is written as either //color[RGB]// or //color["RRGGBB"]//. The R, G, and B values correspond to the intensity of the red, green, and blue elements of the color. When using the //color[R, G, B]// syntax, each parameter value should be an integer ranging from 0 to 255. When using the //color["RRGGBB"]// syntax, the "RRGGBB" string should be a valid six-character hex code ranging from "000000" (black) to "ffffff" (white).
  
-====Example:==== +====Examples:==== 
-<code lua>+<code bauxite>
 color[0, 0, 255] color[0, 0, 255]
 +</code>
 +<code bauxite>
 +color["0000ff"]
 </code> </code>
  
-The example above represents full intensity blue. The RGB values can be taken from one of the built-in color pickers (for example, by editing a palette color on the [[Editor Tools]] tab), or from many common image editing applications like Microsoft Paint.+The examples above both represent full intensity blue. The RGB values or six-character hex code can be taken from one of the built-in color pickers (for example, by editing a [[palette]] color on the [[Editor Tools]] tab), or from many common image editing applications like Microsoft Paint.
  
-When working in the visual Script Editor, any functions that have a color parameter will provide a color picker button in its visual node.+When working in the visual [[Script Editor]], any function that has a color parameter will provide a color picker button in its visual node (as shown in the example below) that can be clicked on to select a color.
  
 {{:wiki:set_ambient_light_color_node.png?nolink|}} {{:wiki:set_ambient_light_color_node.png?nolink|}}
color.txt · Last modified: 2021/04/21 20:24 by justin