Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: RGB to CMYK

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25538] Re: RGB to CMYK
  • From: "Hans Staugaard" <hans.staugaard at get2net.dk>
  • Date: Sat, 7 Oct 2000 03:35:42 -0400 (EDT)
  • References: <8rjik5$odn@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello

Just use the "secret" function ToColor:

In[1]:=
?ToColor

"ToColor[color, form] converts color to form if form is GrayLevel, RGBColor
\
or CMYKColor color is converted into it. Otherwise form[color] is evaluated
\
and the result is expected to be a valid color directive."

In[2]:=
ToColor[RGBColor[1, 0, 0], CMYKColor]

Out[2]=
\!\(CMYKColor[5.46908`*^-6, 0.9958244690799987`, 0.9958244690799987`,
    5.46908`*^-6]\)

Hans


"Bernd Brandt" <bernd at bio.vu.nl> wrote in message
news:8rjik5$odn at smc.vnet.net...
> Hi Group,
>
> I am looking for a conversion function between RGB and CMYK.
> I thought this would not be a problem but i have not found one good
function.
>
> The Mathematica book (examples) includes:
>
> CMYKfromRGB[RGBColor[r_, g_, b_]] :=
> CMYKColor[b, r  b, 1 - b, (r + g + b)/3]
>
> But this is not correct.
> RGBColor[1,0,0] really red, is converted to CMYKColor[0, 0, 1, 0.5],
> which is clearly not red.
>
> Does someone have a correct function?
>
>
> Regards,
> Bernd
>
>
>



  • Prev by Date: Re: ButtonBox and ButtonFuction
  • Next by Date: Complex Function Plot
  • Previous by thread: RGB to CMYK
  • Next by thread: Re: RGB to CMYK