Types/Color

From Official Factorio Wiki
Revision as of 03:49, 27 May 2019 by Zippy (talk | contribs) (Added colors that match the topic, and more examples.)
Jump to navigation Jump to search

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. Alternatively, values can be from 0-255, they are interpreted as such if at least one of r,g or b is > 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
   color = {r=1, g=0.5, b=0, a=1} -- orange
   color = {r=1, g=0.5, b=1, a=1} -- pink