Sending color to an effect via an entity

I use this code to create following effect:
local smoke = EffectData()
util.Effect(“effect_smoke”, smoke)

But it just tell me a lua error
bad argument #1 to ‘SetColor’ (number expected, got table)

How can I send a color to an effect without creating a lua error?

Please check the wiki page for the function before asking questions:

As far as I can tell, you need to convert the color into a number, where the first byte of an integer is the red, second - green, third blue and fourth - alpha channel.

You will need to use the bit library for this.

Already read that, but didnt understood how to bring it to paper.

Here’s something I whipped up but I can’t test it right now, so I am not sure if it works.

local clr = Color( 50, 100, 150, 255 )

local r = clr.r, 255 )
local g = clr.g, 255 )
local b = clr.b, 255 )
local a = clr.a, 255 )

local numberClr = bit.lshift( r, 24 ) + bit.lshift( r, 16 ) + bit.lshift( r, 8 ) + a

Hey, thanks.
This works great.