linebender / linebender/resvg

SVG with both hex colored stroke and display-p3 stroke color is rendered with no stroke

Open
#914 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.1k
Forks
348
Avg merge
1d 14h
Merged PRs (30d)
3

Description

Figma outputs svg files with both a standard SVG color (`stroke="#abcdef"`) as well as a style parameter meant to support future wide gamut colors:

```html

```

When parsed and rendered by resvg, I receive the error "Failed to parse stroke value: 'color(display-p3 0.9804 0.9804 0.9804)'. Fallback to no stroke." Instead, the application should simply discard that part of the style or discard the entire style parameter, instead of falling back to no stroke.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied SVG with resvg and trace how the stroke style is parsed after the standard stroke attribute is read. Done means the unsupported display-p3 portion does not cause the valid stroke to disappear, and the existing parse error behavior can be verified with the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.