Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using CMYK colours in WPF/XAML

Is there any way to specify CMYK colours directly in a XAML document?

prefixing them with # character will create RGB colours, but how to specify a CMYK colour?

Some notes:

  1. The question is NOT about converting from CMYK to RGB but to use real CMYK
  2. The purpose is to allow generated XPS documents (using System.Windows.Xps.Packaging for example) see the colour as CMYK and generate colour codes as "ContextColor /swopcmykprofile.icc a,b,c,d,e" not as "#aarrggbb"

I have tried to define CMYK colours by using ColorContext without any success.

like image 723
el_shayan Avatar asked Jan 28 '11 10:01

el_shayan


1 Answers

OK again! It turned out to be much more easier than what I though: CMYK is directly usable in XAML:

<Grid Background="ContextColor file://C:/WINDOWS/system32/spool/drivers/color/EuroscaleCoated.icc 1.0,0.0,0.0,1.0,1.0">
like image 189
el_shayan Avatar answered Oct 19 '22 13:10

el_shayan