<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
After I had a chance to inform about the CIELab, I believe I should formulate the question differently.<div>Given that I use cairo for pdf output, where the main coloring function is </div><div> cairo_set_source_rgb(cr, 1, 0.0, 1.0);</div><div>I wonder could I output pdf file with colors that I primarily specify in CIELab space.</div><div>So, given certain slice of the CIELab space, I would like to color the pdf file according to colors</div><div>defined in the slice. </div><div>Could this be handled by cairo? </div><div>I got some suggestions on using alternative libraries, but, I suppose this is doable in cairo also.</div><div><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Fri, 20 Jan 2012 11:55:17 +0100<br>> Subject: Re: [cairo] RGB to CIELab transformation<br>> From: ranma42@gmail.com<br>> To: opustenom@hotmail.com<br>> CC: cairo@cairographics.org<br>> <br>> On Fri, Jan 20, 2012 at 8:01 AM, Necko Nedjoni <opustenom@hotmail.com> wrote:<br>> > As a part of a larger project, I was recently assigned to investigate the<br>> > possibility of colorings<br>> > within our visualizations.<br>> > Namely, I came across the CIELab color space, which seems to be preferable<br>> > choice in the related<br>> > literature. The initial readings suggest that a conversion from<br>> > device-depended RGB is possible, and<br>> > I wonder how this could be achieved with cairo.<br>> <br>> Converting a color in a device-dependent colorspace to a color in a<br>> device-independent colorspace is not actually a meaningful operation.<br>> You might assume that the RGB components are in a specific<br>> device-independent colorspace (given current cairo behavior I would<br>> suggest a linear rgb colorspace with the same primaries as sRGB or<br>> sRGB itself).<br>> You could then use normal color conversion routines, like those<br>> provided by LittleCMS.<br>> <br>> ><br>> > The function I use currently (sample):<br>> ><br>> > cairo_set_source_rgb(cr, 1, 0.0, 1.0);<br>> ><br>> > Perhaps someone could share the conversion code.<br>> <br>> I should have something that does it in my colorspaces branches.<br>> I will try to extract it to a standalone snippet.<br>> <br>> Andrea<br>> <br>> ><br>> > --<br>> > cairo mailing list<br>> > cairo@cairographics.org<br>> > http://lists.cairographics.org/mailman/listinfo/cairo<br></div></div>                                            </div></body>
</html>