ant-design / ant-design/html2sketch

🐛[BUG] svg base64 渲染颜色 bug

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
179
Forks
27
PR merge metrics
No merged PRs in 30d

Description

### 🐛 bug 描述

svg 转成 base64 格式,渲染到 sketch 的时候,渲染成黑色,与实际颜色不符

实际颜色:

![image](https://user-images.githubusercontent.com/1013557/100986681-7df58980-3588-11eb-9b5e-ce9e97fa787f.png)

在 sketch 中渲染颜色为黑色:

![image](https://user-images.githubusercontent.com/1013557/100986753-96fe3a80-3588-11eb-8c77-49d57b225dca.png)

### 📷 复现步骤

可在下面 demo 复现

### 🏞 期望结果

颜色渲染正常

### 💻 复现代码

[可复现 demo](https://codesandbox.io/s/black-framework-t6sv6?file=/src/Demo.tsx)

### © 版本信息

- html2sketch 版本: [0.4.6]
- 浏览器环境
- 开发环境 [Mac os 10.14.6]

### 🚑 其他信息

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the linked CodeSandbox reproduction in src/Demo.tsx with html2sketch 0.4.6 and compare the source SVG colors with the Sketch rendering. Trace the SVG-to-base64 rendering path from the demo and identify where color information is lost. Done means the SVG renders in Sketch with its original colors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.