node/lib/metasm/metasm/gui/gtk.rb
def color(val)
		if not @color[val]
			v = case val.length
			when 3; val.scan(/./).map { |c| (c*4).to_i(16) }
			when 6; val.scan(/../).map { |c| (c+c).to_i(16) }
			end
			@color[val] = Gdk::Color.new(*v)
			window.colormap.alloc_color(@color[val], true, true)
		end
		@color[val]
	end
# create a color from a 'rgb' description
create a color from a 'rgb' description
create a color from a ' rgb ' description
def color(val)
		if not @color[val]
			v = case val.length
			when 3; val.scan(/./).map { |c| (c*4).to_i(16) }
			when 6; val.scan(/../).map { |c| (c+c).to_i(16) }
			end
			@color[val] = Gdk::Color.new(*v)
			window.colormap.alloc_color(@color[val], true, true)
		end
		@color[val]
	end
def color ( val ) if not @color [ val ] v = case val . length when 3 ; val . scan ( / . / ) . map { | c | ( c * 4 ) . to_i ( 16 ) } when 6 ; val . scan ( / .. / ) . map { | c | ( c + c ) . to_i ( 16 ) } end @color [ val ] = Gdk :: Color . new ( * v ) window . colormap . alloc_color ( @color [ val ] , true , true ) end @color [ val ] end
create a color from a 'rgb' description
create a color from a ' rgb ' description
val