Issue 120396 - svg export uses wrong color values in rgb function in stop-color of gradient
Summary: svg export uses wrong color values in rgb function in stop-color of gradient
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2012-07-29 18:56 UTC by Regina Henschel
Modified: 2012-08-01 12:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

File to be exported (9.38 KB, application/
2012-07-29 18:56 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2012-07-29 18:56:40 UTC
Created attachment 78770 [details]
File to be exported

Open the attached document. It contains a rectangle with a gradient filling from blue =rgb(0,0,255) to yellow =rgb(255,255,0) without transparency.

Export the document to svg-format.

Open the exported file in a browser or insert it in Draw document. Notice, that the filling is black but should be a gradient.

The reason is, that the colors are written as rgb(0,0,1) and rgb(1,1,0)
That would mean nearly black.

The rgb expects either integer values 0..255 or values 0%..100%.

So instead of rgb(0,0,1) the value has to be rgb(0%,0%,100%) or rgb(0,0,255). I prefer the latter, because it is convertible to the hexdigit syntax without rounding errors.
Comment 1 Armin Le Grand 2012-07-31 12:40:27 UTC
ALG: Tried with fresh build (rev 1367054), could not reproduce. Neither selection nor full page export produces bad svg's, both work as expected. The svg contains:

    <linearGradient id="Gradient_2" gradientUnits="userSpaceOnUse" x1="3781" y1="-1368" x2="6219" y2="5368">
     <stop offset="0" stop-color="rgb(0,0,255)"/>
     <stop offset="1" stop-color="rgb(255,255,0)"/>
   <path fill="url(#Gradient_2)" stroke="none" id="Drawing_1_0" d="M 5000,4000 L 0,4000 0,0 10000,0 10000,4000 5000,4000 Z"/>

Could not reproduce.
Comment 2 Regina Henschel 2012-08-01 12:43:23 UTC
I tried it with my build of r1367616. And indeed, the error is fixed in the meantime.