Skip to content
Emd4600 edited this page Mar 23, 2019 · 3 revisions

In PROP and PFX files, colors are specified in a special way:

color (1.0, 0, 0.5)

As you can see, colors are specified in parenthesis, with three values ranging from 0 to 1. Each value corresponds to a color channel: (red, green, blue)

In the previous example, the red channel has the maximum value (1.0), the green channel has no color (0), and blue has an intermediate color. It would be equivalent to the color code #ff0080

In many image editing programs, colors are specified in the [0, 255] range; in SMFX, you just need to divide by 255. In fact, you can even tell the compiler to do it:

color (176 / 255, 89 / 255, 230 / 255)

Sometimes, it's possible to specify a fourth value in the colour, the alpha (opacity). A value of 1.0 is completely opaque, a value of 0.0 is completely transparent (so not visible).

Clone this wiki locally