2

I'm using pdf-writer gem in ruby.

While drawing a table, i need to set the shade_color and shade_color2 of table so that the rows get the alternate shade and shade2 colors.

Can anyone tell me how to set them?

Like table.shade2 = Color::RGB::Magenta

But i have a hexa vaue like 989898. Now, how to use this.

Any help is appreciated.

Thanks

lillq
  • 14,758
  • 20
  • 53
  • 58
Satya Kalluri
  • 5,148
  • 4
  • 28
  • 37

2 Answers2

3

Cool,

I found it by myself:

table.shade2 = Color::RGB.new(227,241,254)

The same can be used elsewhere:

table.line_color = Color::RGB.new(227,241,254)

Satya Kalluri
  • 5,148
  • 4
  • 28
  • 37
1

Just as a sidenote: PDF::Writer has been more or less abandoned and been replaced by Prawn.

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653