parseColor() in simplestyle.py can't parse colors of type rgb(xx.x%,xx.x%,xx.xx%)
Bug #298528 reported by
Kjell Magne Fauske
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
Kjell Magne Fauske |
Bug Description
The parseColor() function in simplestyle.py can't parse valid color expressions like:
parseColor(
parseColor(
parsecolor(
I have attached a patch that fixes the first problem. I have also attached unit tests that verifies it.
For the two other color types there is no straightforward solution since resolving the color code requires knowledge of the environment. A workaround is to return a default color, but it is not an ideal solution.
tags: |
added: extensions-plugins removed: extensions |
Changed in inkscape: | |
assignee: | nobody → JazzyNico (jazzynico) |
importance: | Undecided → Low |
milestone: | none → 0.49 |
status: | New → In Progress |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I have attached a patch that return a default color (black) in cases where the color is unknown. Not sure if this is the best approach, but it is probably better than raising an exception.