lua-users home
lua-l archive

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


>> >> I just posted a simple ANSI terminal color manipulation module on
>> >> the wiki for anyone who would find it useful; I know I like
>> >> throwing different colors out onto the console from time to time.

>> > Useful stuff, thanks!

>> > Do you care about hosting it on, say, GitHub, and making a luarock
>> > for it?

>> Afterthought: if you do, please rename the module to, say, ansicolors,
>> "colors" is, IMHO, too generic.

> Done and pushed to GitHub.

Cool!

>> Also, I'd like to have color constants visible from outside the
>> module, in case I'd ever want to implement my own makecolor.

> What kind of makecolor adaptation did you have in mind?

Well, nothing in particular right now. But I think that those
constants do have value for themselves.

BTW, I think that this string concatenation

    schar(27) .. '[' .. tostring(value) .. 'm'

may also be extracted to a function and exported from a module along
with constants. You know, like low- and high-level layers of code.

Alexander.