Skip to content

feat: make typst background transparent#839

Open
BenFradet wants to merge 1 commit intomfontanini:masterfrom
BenFradet:transparent-typst-bg
Open

feat: make typst background transparent#839
BenFradet wants to merge 1 commit intomfontanini:masterfrom
BenFradet:transparent-typst-bg

Conversation

@BenFradet
Copy link

What

support alpha channels for typst colours

Why

At the moment, if the theme you're using specifies typst colours, there is no way to go back to a transparent background.

White,
Grey,
Rgb { r: u8, g: u8, b: u8 },
Rgba { r: u8, g: u8, b: u8, a: u8 },
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't particularly like this approach since now any color can have an alpha component, but this has no effect anywhere except in the typst case. I think a better approach is to introduce a tiny RgbaColor type that's parseable from hex and use that inside the typst style config for its background color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants