lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I would also have initialized the default to { r=0, g=0, b=0 } rather
than {}, to avoid doing a modulo on nil.

/s/ Adam

On Mon, May 20, 2013 at 10:52 AM, Kaj Eijlers <bizziboi@gmail.com> wrote:
> Also, in general colors are are clamped and not modulo'd, as adding a bit to
> a bright color could result in a dark color with modulo.
>
>
> On Mon, May 20, 2013 at 1:39 PM, Ashwin Hirschi <lua-l@reflexis.com> wrote:
>>
>>
>> Perhaps you should also consider changing 255 into 256 for the modulo
>> operation...
>>
>> Ashwin.
>>
>