aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/screen_text_color.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/screen_text_color.rb')
-rw-r--r--lib/sisu/v5/screen_text_color.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/sisu/v5/screen_text_color.rb b/lib/sisu/v5/screen_text_color.rb
index ebd954ae..10ced907 100644
--- a/lib/sisu/v5/screen_text_color.rb
+++ b/lib/sisu/v5/screen_text_color.rb
@@ -61,7 +61,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,:white_bold,: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,:fuchsia_hi,:red_hi,:orange_hi,:yellow_hi,:brown_hi,:lightgreen_hi,:green_hi,:cyan_hi,:blue_hi,:navy_hi,:white,:white_bold,:grey,:pink,:fuchsia,:ruby,:red,:orange,:yellow,:brown,:green,:darkgreen,:cyan,:blue,:navy,:black
def initialize(&block)
instance_eval &block
end
@@ -83,7 +83,7 @@ module SiSU_Screen
end
@cX=@@cX= unless @use_color
Color.new do
- 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=''
+ 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.fuchsia_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.fuchsia=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
@@ -97,7 +97,7 @@ module SiSU_Screen
self.darkgrey_hi = "\033[100m"
self.grey_hi = "\033[47m"
self.pink_hi = "\033[105m"
- self.fuschia_hi = "\033[45m"
+ self.fuchsia_hi = "\033[45m"
self.red_hi = "\033[41m"
self.orange_hi = "\033[101m"
self.yellow_hi = "\033[103m"
@@ -109,7 +109,7 @@ module SiSU_Screen
self.navy_hi = "\033[44m"
self.grey = "\033[90m"
self.pink = "\033[95m"
- self.fuschia = "\033[35m"
+ self.fuchsia = "\033[35m"
self.ruby = "\033[31m"
self.red = "\033[91m" #check
self.orange = "\033[91m"
@@ -134,7 +134,7 @@ module SiSU_Screen
when /darkgrey_hi/; @cX.darkgrey_hi
when /grey_hi/; @cX.grey_hi
when /pink_hi/; @cX.pink_hi
- when /fuschia_hi/; @cX.fuschia_hi
+ when /fuchsia_hi/; @cX.fuchsia_hi
when /red_hi/; @cX.red_hi
when /orange_hi/; @cX.orange_hi
when /yellow_hi/; @cX.yellow_hi
@@ -147,7 +147,7 @@ module SiSU_Screen
when /white/; @cX.white
when /grey/; @cX.grey
when /pink/; @cX.pink
- when /fuschia/; @cX.fuschia
+ when /fuchsia/; @cX.fuchsia
when /ruby/; @cX.ruby
when /red/; @cX.red
when /orange/; @cX.orange
@@ -168,7 +168,7 @@ module SiSU_Screen
when /darkgrey_hi/; puts "#{@cX.darkgrey_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /grey_hi/; puts "#{@cX.grey_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /pink_hi/; puts "#{@cX.pink_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
- when /fuschia_hi/; puts "#{@cX.fuschia_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
+ when /fuchsia_hi/; puts "#{@cX.fuchsia_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /red_hi/; puts "#{@cX.red_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /orange_hi/; puts "#{@cX.orange_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
when /yellow_hi/; puts "#{@cX.yellow_hi}#{@txt[1]}#{@cX.off} #{@cX.blue}#{@txt[2]}#{@cX.off} #{@cX.grey}#{@txt[3]}#{@cX.off}"
@@ -182,7 +182,7 @@ module SiSU_Screen
when /white/; puts "#{@cX.off}#{@txt[1]} #{@txt[2]}"
when /grey/; puts "#{@cX.grey}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /pink/; puts "#{@cX.pink}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
- when /fuschia/; puts "#{@cX.fuschia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
+ when /fuchsia/; puts "#{@cX.fuchsia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /ruby/; puts "#{@cX.ruby}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /red/; puts "#{@cX.red}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
when /orange/; puts "#{@cX.orange}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
@@ -204,16 +204,16 @@ module SiSU_Screen
def sisu
end
def rescue
- STDERR.puts %{\t #{@cX.orange}Rescued#{@cX.off} #{@cX.grey}#{yield if block_given?}\n\t An#{@cX.off} #{@cX.fuschia}ERROR#{@cX.off} #{@cX.grey}occurred, message:#{@cX.off} #{@cX.fuschia}#{@txt[0]}#{@cX.off} #{@cX.grey}#{@txt[1]}#{@cX.off} #{@cX.brown}#{@txt[2]}#{@cX.off}}
+ STDERR.puts %{\t #{@cX.orange}Rescued#{@cX.off} #{@cX.grey}#{yield if block_given?}\n\t An#{@cX.off} #{@cX.fuchsia}ERROR#{@cX.off} #{@cX.grey}occurred, message:#{@cX.off} #{@cX.fuchsia}#{@txt[0]}#{@cX.off} #{@cX.grey}#{@txt[1]}#{@cX.off} #{@cX.brown}#{@txt[2]}#{@cX.off}}
end
def warn
STDERR.puts "\t #{@cX.brown}#{@txt[0]}#{@cX.off} #{@cX.grey}#{@txt[1]}#{@cX.off}"
end
def error
- STDERR.puts "\t #{@cX.fuschia}#{@txt[0]}#{@cX.off} #{@cX.brown}#{@txt[1]}#{@cX.off}"
+ STDERR.puts "\t #{@cX.fuchsia}#{@txt[0]}#{@cX.off} #{@cX.brown}#{@txt[1]}#{@cX.off}"
end
def error2
- STDERR.puts "\t #{@cX.grey}#{@txt[0]}#{@cX.off} #{@cX.fuschia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
+ STDERR.puts "\t #{@cX.grey}#{@txt[0]}#{@cX.off} #{@cX.fuchsia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
end
def version
puts "#{@cX.blue_hi}#{@txt[0]} #{@txt[1]}#{@cX.off} #{@cX.grey} (#{@txt[3]} [#{@txt[2]}]) &#{@cX.off} #{@cX.ruby}Ruby#{@cX.off} #{@cX.grey}(#{@txt[4]})#{@cX.off}\n"
@@ -421,7 +421,7 @@ __END__
self.darkgrey_hi = "\033[100m"
self.grey_hi = "\033[47m"
self.pink_hi = "\033[105m"
- self.fuschia_hi = "\033[45m"
+ self.fuchsia_hi = "\033[45m"
self.red_hi = "\033[41m"
self.orange_hi = "\033[101m"
self.yellow_hi = "\033[103m"
@@ -433,7 +433,7 @@ __END__
self.navy_hi = "\033[44m"
self.grey = "\033[90m"
self.pink = "\033[95m"
- self.fuschia = "\033[35m"
+ self.fuchsia = "\033[35m"
self.ruby = "\033[31m"
self.red = "\033[91m" #check
self.orange = "\033[91m"
@@ -457,7 +457,7 @@ __END__
self.darkgrey_hi = "\033[100m"
self.grey_hi = "\033[47m"
self.pink_hi = "\033[105m"
- self.fuschia_hi = "\033[45m"
+ self.fuchsia_hi = "\033[45m"
self.red_hi = "\033[41m"
self.orange_hi = "\033[101m"
self.yellow_hi = "\033[103m"
@@ -469,7 +469,7 @@ __END__
self.navy_hi = "\033[44m"
self.grey = "\033[90m"
self.pink = "\033[95m"
- self.fuschia = "\033[35m"
+ self.fuchsia = "\033[35m"
self.ruby = "\033[31m"
self.red = "\033[31m" #check
self.orange = "\033[91m"