hadoob024 Posted March 19, 2010 Share Posted March 19, 2010 I was wondering if anyone knows how to change colors of text, shapes, etc. with ezPDF? I read through their documentation and it says that: "(r,g,b) array, defining the colour of the shading, values from 0 to 1, default is (0.8,0.8,0." I'm confused though. If it's rgb colors, then I assumed that the value range would be from 0 to 255. I'm trying to make a particular blue color. As of now, I have the following bit of code for color: 'shadeCol2' => array (0,0,0.4) This gets me a blue color, but the wrong shade. And it's hard to figure out the correct shade when I don't know how to manipulate these numbers. Anyone come across this? Quote Link to comment https://forums.phpfreaks.com/topic/195799-specifying-color-in-ezpdf/ Share on other sites More sharing options...
hadoob024 Posted March 19, 2010 Author Share Posted March 19, 2010 Nevermind. I just found the following: "1. In EZPDF you can set the colour of the text, shapes, lines etc., the colour needs to be specified in RGB triplet, each in the range 0 to 1. Most of the tools(eg:- Colour picker, Adobe Photoshop) shows the colour in the range of 0-255 or in Hexadecimal format. If you want the colour values in the range of 0-1, divide the colour values by 255. For example Blue is rgb(0, 155, 255). You can convert it in to 0-1 range by dividing each values by 255. So the blue is rgb(0, 0.61, 1) in 0-1 range." Quote Link to comment https://forums.phpfreaks.com/topic/195799-specifying-color-in-ezpdf/#findComment-1028575 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.