css - How can I apply custom colors to a PdfPCell's background? -
i've got itextsharp code give cell on pdf file green background:
pdfpcell cellsec2 = new pdfpcell(parsectionheading2); cellsec2.backgroundcolor = basecolor.green;
the problem "basecolor.green" dark/intense. need more of verdigris color - light green, or pale green. possible assign rgb (or rgba) values or such backgroundcolor property?
update
bruno's answer plus this site, , you've got need. needed:
var lightgreen = new basecolor(204, 255, 204); cellsec2.backgroundcolor = lightgreen;
we have plenty of documentation on things itext. instance: chapter 10 of my book images , color. if don't own copy of book, why don't take @ examples of chapter 10?
take instance devicecolor.cs have plenty of examples of other colors such as:
new graycolor(0x20) // gray value new basecolor(0f, 1f, 1f) // rgb new cmykcolor(0x00, 0x00, 0xff, 0xff) // cmyk
the values r, g , b, or c, m, y , k, can either floats between 0 , 1 or integers between 0 , 255.
Comments
Post a Comment