PDF::Writer:PDF::SimpleTable#shade_color2, #shade_color2=
require 'pdf/simpletable' pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) p tab.shade_color2 tab.shade_color2 = Color::RGB::Blue tab.shade_rows = :striped tab.show_lines = :all data = [ { "col1" => "foo1", "col2" => "bar1", "col3" => "baz1" }, { "col1" => "foo2", "col2" => "bar2", "col3" => "baz2" }, { "col1" => "foo3", "col2" => "bar3", "col3" => "baz3" }, ] tab.data.replace data tab.render_on(pdf) end pdf.save_as("2008040600.pdf")
で、
#<Color::RGB:0x40252804 @r=0.7, @b=0.7, @g=0.7>
SimpleTable#shade_rows が :striped のときに使われるものらしい