i m now working in itextsharp pdf generation. Here i hav one pbm to produce color in RGB ratio or Hexadecimal code, i used BaseColor class in itextsharp pdf generation my code is here....
public BaseColor col(string value)
{
if (value == "3")
return BaseColor.YELLOW;
else if (value == "2")
return BaseColor.ORANGE;
else if (value == "1")
return BaseColor.BLUE;
else if (value == "")
return BaseColor.WHITE;
return BaseColor.WHITE;
}
in this code i hav to fetch this color #56670B code to replace my yellow color ie.,BaseColor.YELLOW to #798F10 this color.
i tried so many but BaseColor class not support that .... help me to fetch this code in BaseColor class
or if u know any way to this color in RGB ratio (121,143,16) = #798F10 i need any one way please help me.
please help if u really know its urgent ans me......
vpraveenkuma...
Member
53 Points
53 Posts
itextshart base color for pdf generation
Aug 30, 2012 04:17 PM|LINK
hi guys,
i m now working in itextsharp pdf generation. Here i hav one pbm to produce color in RGB ratio or Hexadecimal code, i used BaseColor class in itextsharp pdf generation my code is here....
public BaseColor col(string value) { if (value == "3") return BaseColor.YELLOW; else if (value == "2") return BaseColor.ORANGE; else if (value == "1") return BaseColor.BLUE; else if (value == "") return BaseColor.WHITE; return BaseColor.WHITE; }in this code i hav to fetch this color #56670B code to replace my yellow color ie.,BaseColor.YELLOW to #798F10 this color.
i tried so many but BaseColor class not support that .... help me to fetch this code in BaseColor class
or if u know any way to this color in RGB ratio (121,143,16) = #798F10 i need any one way please help me.
please help if u really know its urgent ans me......
prabu.raveen...
Contributor
5020 Points
955 Posts
Re: itextshart base color for pdf generation
Aug 31, 2012 10:58 AM|LINK
Try like this,
return new BaseColor(121,143,16);