Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom accent color #36

Merged
merged 2 commits into from
Jul 21, 2024
Merged

Conversation

alberto-lazari
Copy link
Contributor

Currently, when setting a custom accent color in metadata.toml, with something like

[layout]
awesome_color = 'rgb(#FF00AA)'

the code in setAccentColor checks for the type of the parameter.

Problem is, if you try getting the type of param with something like

#let metadata = toml("/metadata.toml")
#type(metadata.layout.awesome_color)

it will always print out string, so the function will always try to use one of awesomeColors

@yunanwg
Copy link
Owner

yunanwg commented Jul 21, 2024

Hi @alberto-lazari thanks for spotting this issue! However your original commit doesn't compile correctly.

Just added a new patch, please check if this is working for you.

@alberto-lazari
Copy link
Contributor Author

Just added a new patch, please check if this is working for you.

Thanks, this approach is definitely more intuitive. I can confirm it works for me too

@yunanwg
Copy link
Owner

yunanwg commented Jul 21, 2024

Perfecto ! I will merge this patch right away.

@yunanwg yunanwg merged commit a510e09 into yunanwg:main Jul 21, 2024
@alberto-lazari alberto-lazari deleted the custom-color-fix branch July 21, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants