jugyo / termtter

moved to https://github.com/termtter/termtter
201 stars 34 forks source link

256 colour support #122

Closed tremby closed 13 years ago

tremby commented 14 years ago

I'd very much like to see 256-colour support in termtter.

ohac commented 14 years ago

I'm using below setting in .termtter/config

config.plugins.stdout.colors = '555'.to_i(6).times.map{|i| "f#{('00'+i.to_s(6))[-3,3]}"}.
select{|s|s.count('0') < 2} + [31, 32, 33, 35, 36, 91, 92, 93, 94, 95, 96] +
(12..24).map{|i| "f#{i}"}
tremby commented 14 years ago

Fantastic. But can you explain how that works?

ohac commented 14 years ago

termcolor can handle these expression.

Check this commit. http://github.com/jugyo/termcolor/commit/9d8f032505182ac46b4c119e17fbb193b0761a79