class KbColor
Attributes
a[RW]
b[RW]
g[RW]
r[RW]
v[RW]
Public Class Methods
new()
click to toggle source
# File lib/kb_color.rb, line 4 def initialize() @r = 0 @g = 0 @b = 0 @v = 0 @a = 0 end
Public Instance Methods
convert_s(x )
click to toggle source
# File lib/kb_color.rb, line 16 def convert_s(x ) x = x.to_s(16) if x.length == 1 x = "0" + x.to_s end return x end
to_s()
click to toggle source
# File lib/kb_color.rb, line 12 def to_s() convert_s(@r) + convert_s(@g) + convert_s(@b) + convert_s(@v) + convert_s(@a) end