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

Successfully precompile _parse_colorant #445

Merged
merged 1 commit into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Colors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ include("colormaps.jl")
include("display.jl")
include("colormatch.jl")

"""
Colors used in the Julia logo as a `NamedTuple`.

The keys are approximate descriptions of the hue and do not include black.

Not exported, use as `JULIA_LOGO_COLORS.red` etc.
"""
const JULIA_LOGO_COLORS = (red = RGB{N0f8}(0.796, 0.235, 0.2), # colorant"#cb3c33" blocks precompilation
green = RGB{N0f8}(0.22, 0.596, 0.149),
blue = RGB{N0f8}(0.251, 0.388, 0.847),
purple = RGB{N0f8}(0.584, 0.345, 0.698))

if VERSION >= v"1.1" # work around https://github.com/JuliaLang/julia/issues/34121
include("precompile.jl")
_precompile_()
Expand Down
12 changes: 0 additions & 12 deletions src/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,3 @@ end
Base.depwarn("color(\"$str\") is deprecated, use colorant\"$str\" or parse(Colorant, \"$str\")", :color)
parse(Colorant, str)
end

"""
Colors used in the Julia logo as a `NamedTuple`.

The keys are approximate descriptions of the hue and do not include black.

Not exported, use as `JULIA_LOGO_COLORS.red` etc.
"""
const JULIA_LOGO_COLORS = (red = colorant"#cb3c33",
green = colorant"#389826",
blue = colorant"#4063d8",
purple = colorant"#9558b2")