summaryrefslogtreecommitdiffhomepage
path: root/dragon/console_color.rb
diff options
context:
space:
mode:
Diffstat (limited to 'dragon/console_color.rb')
-rw-r--r--dragon/console_color.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/dragon/console_color.rb b/dragon/console_color.rb
index f5b164d..1b19c22 100644
--- a/dragon/console_color.rb
+++ b/dragon/console_color.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
# Copyright 2019 DragonRuby LLC
# MIT License
# console_color.rb has been released under MIT (*only this file*).
@@ -22,6 +23,10 @@ module GTK
@color
end
+ def to_s
+ "GTK::Console::Color #{to_h}"
+ end
+
def to_h
{ r: @color[0], g: @color[1], b: @color[2], a: @color[3] }
end