I am "experimenting" a little with colors in a PDF file.
In the file I create two squares. The first square is colored using DeviceCMYK.
The second square has the same color as the first one, but using DeviceRGB as the colorspace.
When converting from CMYK to RGB I use the conversion formulas from section 10.3.5 in the PDF-specification.
But the two squares have quite different colors. Can somebody explain whats going on?
The Pdf is give below. In the file DeviceRGB
R: 0.29
G: 0.97
B: 0.14
should be the same as DeviceCMYK
C: 0.68
M: 0
Y: 0.83
K: 0.03
(The file:)
%PDF-1.5
1 0 obj
<<
/Length 330
>>
stream
q
1 0 0 1 57.47015494031 84.170688341377 cm
1 0 0 1 0 0 cm
1 0 0 1 0 0 cm
1 0 0 1 0 0 cm
1 0 0 1 -57.47015494031 -84.170688341377 cm
/DeviceCMYK CS
1 1 1 1 SCN
/DeviceRGB cs
0.29 0.97 0.14 scn
0.2743205486411 w
2.743205486411 M
0 J
0 j
40.873761747523 68.397256794514 33.192786385573 31.546863093726 re
h
B
Q
endstream
endobj
2 0 obj
<<
/Length 329
>>
stream
q
1 0 0 1 97.658115316231 68.260096520193 cm
1 0 0 1 0 0 cm
1 0 0 1 0 0 cm
1 0 0 1 0 0 cm
1 0 0 1 -97.658115316231 -68.260096520193 cm
/DeviceCMYK CS
1 1 1 1 SCN
/DeviceCMYK cs
0.68 0 0.83 0.03 scn
0.2743205486411 w
2.743205486411 M
0 J
0 j
80.1016002032 56.327152654305 35.11303022606 23.865887731775 re
h
B
Q
endstream
endobj
3 0 obj
<<
/Type /Page
/Parent 4 0 R
/Resources <<
/Font <<>>
/XObject <<>>
>>
/MediaBox [0 0 255.11811023622 141.73228346457]
/Contents [1 0 R 2 0 R]
>>
endobj
4 0 obj
<<
/Type /Pages
/Kids [3 0 R]
/Count 1
>>
5 0 obj
<<
/Type /Catalog
/Pages 4 0 R
>>
endobj
xref
0 6
0000000000 65535 f
0000000010 00000 n
0000000397 00000 n
0000000783 00000 n
0000000956 00000 n
0000001012 00000 n
trailer
<<
/Size 6
/Root 5 0 R
>>
startxref
1067
%%EOF