Types/Color: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(→‎Example: removed invalid examples)
(Undo revision 166020 by Bilka (talk) nvm)
Tag: Undo
Line 4: Line 4:
! name !! meaning !! type
! name !! meaning !! type
|-
|-
| r || red value || [[Types/float|float]]
| r || [optional, default 0] red value || [[Types/float|float]]
|-
|-
| g || green value || [[Types/float|float]]
| g || [optional, default 0] green value || [[Types/float|float]]
|-
|-
| b || blue value || [[Types/float|float]]
| b || [optional, default 0] blue value || [[Types/float|float]]
|-
|-
| a || [optional, default 1] alpha value - transparency || [[Types/float|float]]
| a || [optional, default 1] alpha value - transparency || [[Types/float|float]]
Line 14: Line 14:


=== Example ===
=== Example ===
     color = {r=1, g=0, b=0} -- red
     color = {r=1, g=0, b=0, a=0.5} -- red
    color = {r=1, a=0.5} -- the same red, omitting 0 colors
    color = {} -- black

Revision as of 10:42, 8 December 2018

Table of red, green, blue, and alpha float values between 0 and 1. All values are optional, default optional value for colors is 0, for alpha 1.

name meaning type
r [optional, default 0] red value float
g [optional, default 0] green value float
b [optional, default 0] blue value float
a [optional, default 1] alpha value - transparency float

Example

   color = {r=1, g=0, b=0, a=0.5} -- red
   color = {r=1, a=0.5} -- the same red, omitting 0 colors
   color = {} -- black