Print Coloring

Discuss the development of Lua addons for Ashita v3 here.
Post Reply
shinzaku
Posts: 52
Joined: Wed May 17, 2017 8:34 am

Print Coloring

Post by shinzaku » Fri Jul 07, 2017 8:00 am

I've noticed addons are able to color print output by used string.format and \XX\XX

Is there any list or chart for color reference for what each of those numbers behind the two slashes equal? Would definitely be helpful.
If it's just trial and error, I'll go for it.
User avatar
atom0s
Site Admin
Posts: 383
Joined: Sat May 14, 2016 5:13 pm

Re: Print Coloring

Post by atom0s » Fri Jul 07, 2017 9:26 am

For codes starting with 0x1E: (\30)
http://i.imgur.com/qlEK8cN.png

For codes starting with 0x1F: (\31)
http://i.imgur.com/vYJXf2b.png

Lua escapes the numbers in decimal format, so 0x1F (which is hex) is converted back to decimal and escaped as \31.
Lead Ashita Developer

Want to donate to say thanks?
https://www.paypal.me/atom0s
shinzaku
Posts: 52
Joined: Wed May 17, 2017 8:34 am

Re: Print Coloring

Post by shinzaku » Fri Jul 07, 2017 1:20 pm

Thanks so much! :D
Post Reply