aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-04-19 21:24:24 -0400
committerRalph Amissah <ralph@amissah.com>2011-04-19 21:24:24 -0400
commit2dcb16c5658eb0ff25d1e2bad91d7050508f37d8 (patch)
tree75d6c57ef032ba4a3da137e72210c3262c01108a /lib
parentv2 v3: vim cterm colorschemes "8" and "frugal" added (diff)
v3: screen_text_color (ansi colors) touched, consider reviewing later
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/screen_text_color.rb81
1 files changed, 77 insertions, 4 deletions
diff --git a/lib/sisu/v3/screen_text_color.rb b/lib/sisu/v3/screen_text_color.rb
index d4855ccd..3ad5b09d 100644
--- a/lib/sisu/v3/screen_text_color.rb
+++ b/lib/sisu/v3/screen_text_color.rb
@@ -58,7 +58,7 @@
=end
module SiSU_Screen
class Color
- attr_accessor :off,:marker,:bold,:underline,:invert,:darkgrey_hi,:grey_hi,:pink_hi,:fuschia_hi,:red_hi,:orange_hi,:yellow_hi,:brown_hi,:lightgreen_hi,:green_hi,:cyan_hi,:blue_hi,:navy_hi,:white,:grey,:pink,:fuschia,:ruby,:red,:orange,:yellow,:brown,:green,:darkgreen,:cyan,:blue,:navy,:black
+ attr_accessor :off,:marker,:bold,:underline,:invert,:darkgrey_hi,:grey_hi,:pink_hi,:fuschia_hi,:red_hi,:orange_hi,:yellow_hi,:brown_hi,:lightgreen_hi,:green_hi,:cyan_hi,:blue_hi,:navy_hi,:white,:white_bold,:grey,:pink,:fuschia,:ruby,:red,:orange,:yellow,:brown,:green,:darkgreen,:cyan,:blue,:navy,:black
def initialize(&block)
instance_eval &block
end
@@ -85,12 +85,13 @@ module SiSU_Screen
end
@cX=@@cX= unless @use_color
Color.new do
- self.off=self.white=self.marker=self.bold=self.underline=self.invert=self.darkgrey_hi=self.grey_hi=self.pink_hi=self.fuschia_hi=self.red_hi=self.orange_hi=self.yellow_hi=self.brown_hi=self.lightgreen_hi=self.green_hi=self.cyan_hi=self.blue_hi=self.navy_hi=self.grey=self.pink=self.fuschia=self.ruby=self.red=self.orange=self.yellow=self.brown=self.green=self.darkgreen=self.cyan=self.blue=self.navy=self.black=''
+ self.off=self.white=self.white_bold=self.marker=self.bold=self.underline=self.invert=self.darkgrey_hi=self.grey_hi=self.pink_hi=self.fuschia_hi=self.red_hi=self.orange_hi=self.yellow_hi=self.brown_hi=self.lightgreen_hi=self.green_hi=self.cyan_hi=self.blue_hi=self.navy_hi=self.grey=self.pink=self.fuschia=self.ruby=self.red=self.orange=self.yellow=self.brown=self.green=self.darkgreen=self.cyan=self.blue=self.navy=self.black=''
end
else #default set to colors on
Color.new do
self.off = "\033[0m"
- self.white = "\033[0m"
+ self.white = "\033[37m"
+ self.white_bold = "\033[1m"
self.marker = "\033[42m"
self.bold = "\033[1m"
self.underline = "\033[4m"
@@ -127,7 +128,7 @@ module SiSU_Screen
end
def colors
0.upto(109) {|i| print "\033[#{i}m 33[#{i}m \033[m"}
- puts ''
+ puts ''
end
def color
case @color_instruct
@@ -412,3 +413,75 @@ module SiSU_Screen
end
end
__END__
+ Color.new do
+ self.off = "\033[0m"
+ self.white = "\033[37m"
+ self.white_bold = "\033[1m"
+ self.marker = "\033[42m"
+ self.bold = "\033[1m"
+ self.underline = "\033[4m"
+ self.invert = "\033[7m"
+ self.darkgrey_hi = "\033[100m"
+ self.grey_hi = "\033[47m"
+ self.pink_hi = "\033[105m"
+ self.fuschia_hi = "\033[45m"
+ self.red_hi = "\033[41m"
+ self.orange_hi = "\033[101m"
+ self.yellow_hi = "\033[103m"
+ self.brown_hi = "\033[43m"
+ self.lightgreen_hi = "\033[102m"
+ self.green_hi = "\033[42m"
+ self.cyan_hi = "\033[106m"
+ self.blue_hi = "\033[104m"
+ self.navy_hi = "\033[44m"
+ self.grey = "\033[90m"
+ self.pink = "\033[95m"
+ self.fuschia = "\033[35m"
+ self.ruby = "\033[31m"
+ self.red = "\033[91m" #check
+ self.orange = "\033[91m"
+ self.yellow = "\033[93m"
+ self.brown = "\033[33m"
+ self.green = "\033[92m"
+ self.darkgreen = "\033[32m"
+ self.cyan = "\033[36m"
+ self.blue = "\033[94m"
+ self.navy = "\033[34m"
+ self.black = "\033[30m"
+ end
+# fewer colors
+ Color.new do
+ self.off = "\033[0m"
+ self.white = "\033[0m"
+ self.marker = "\033[42m"
+ self.bold = "\033[1m"
+ self.underline = "\033[4m"
+ self.invert = "\033[7m"
+ self.darkgrey_hi = "\033[100m"
+ self.grey_hi = "\033[47m"
+ self.pink_hi = "\033[105m"
+ self.fuschia_hi = "\033[45m"
+ self.red_hi = "\033[41m"
+ self.orange_hi = "\033[101m"
+ self.yellow_hi = "\033[103m"
+ self.brown_hi = "\033[43m"
+ self.lightgreen_hi = "\033[102m"
+ self.green_hi = "\033[42m"
+ self.cyan_hi = "\033[106m"
+ self.blue_hi = "\033[104m"
+ self.navy_hi = "\033[44m"
+ self.grey = "\033[90m"
+ self.pink = "\033[95m"
+ self.fuschia = "\033[35m"
+ self.ruby = "\033[31m"
+ self.red = "\033[31m" #check
+ self.orange = "\033[91m"
+ self.yellow = "\033[33m"
+ self.brown = "\033[33m"
+ self.green = "\033[32m"
+ self.darkgreen = "\033[32m"
+ self.cyan = "\033[36m"
+ self.blue = "\033[34m"
+ self.navy = "\033[34m"
+ self.black = "\033[30m"
+ end