Skip to content

Commit

Permalink
fix parse Colorant
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Feb 21, 2025
1 parent dce0067 commit f21374a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rendering.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ using FileIO
using ImageTransformations
include("svg.jl")
# because of float error, (randommask(color=Gray(0.3))|>tobitmap)[300,300]|>torgba != Gray(0.3)|>torgba
parsecolor(c) = ARGB{Colors.N0f8}(parse(Colorant, c))
parsecolor(c) = parsecolor(parse(Colorant, c))
parsecolor(c::Colorant) = ARGB{Colors.N0f8}(c)
parsecolor(c::ARGB{Colors.N0f8}) = c
parsecolor(tp::Tuple) = ARGB{Colors.N0f8}(tp...)
parsecolor(gray::Real) = ARGB{Colors.N0f8}(Gray(gray))
parsecolor(sc::Symbol) = parsecolor.(colorschemes[sc].colors)
Expand Down

2 comments on commit f21374a

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/125776

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.3.1 -m "<description of version>" f21374a1a49e5a5843fa7f6a7326ba32034efe26
git push origin v1.3.1

Please sign in to comment.