Skip to content

Commit

Permalink
Better explanation for color remixing
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong committed Oct 10, 2022
1 parent 5f92e96 commit bef0337
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/cn/editor/custom-preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ Taio 可以使用 `CSS` 和 `JavaScript` 来定制预览的样式和行为。

如果可能的话,尽量避免在 HTML body 上使用半透明的背景色。

当为带有半透明背景的 HTML 生成 PDF 时,Taio 会重新混合颜色以去除 alpha 通道,以便用相同的颜色填充 PDF 纸张的背景。
当为带有半透明背景的 HTML 生成 PDF 时,Taio 会重新混合前景色和背景并删除 alpha 通道,以便用相同的颜色填充 PDF 纸张的背景。

这会尽力还原初始的颜色,但并不保证总是成功。

### 快速切换器

Expand Down
4 changes: 3 additions & 1 deletion docs/editor/custom-preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ Generally, we will need to cover bunches of selectors to have a complete overwri

If possible, try to avoid using translucent background colors on the HTML body.

When generating PDF for HTML with translucent background color, Taio remixes the color to remove the alpha channel, in order to fill the PDF paper background with the same color.
When generating PDF for HTML with translucent background color, Taio remixes the foreground color and background and removes the alpha channel, in order to fill the PDF paper background with the same color.

It tries its best to replicate the original colors but that's not guaranteed.

### Quick Switcher

Expand Down

0 comments on commit bef0337

Please sign in to comment.