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

Make Colors.jl a direct dependency #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ uuid = "a03496cd-edff-5a9b-9e67-9cda94a718b5"
version = "0.8.19"

[deps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand All @@ -27,7 +28,6 @@ Requires = "1"
julia = "1.4"

[extensions]
ColorsExt = "Colors"
DataFramesExt = "DataFrames"
DistributionsExt = "Distributions"
IJuliaExt = "IJulia"
Expand All @@ -43,7 +43,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
test = ["Dates", "DelimitedFiles", "Test", "DataFrames"]

[weakdeps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
Expand Down
8 changes: 0 additions & 8 deletions ext/ColorsExt.jl

This file was deleted.

2 changes: 1 addition & 1 deletion src/PlotlyBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using DocStringExtensions
using UUIDs
using Dates
using Logging
using Colors
using ColorSchemes
using Parameters

Expand Down Expand Up @@ -159,7 +160,6 @@ function __init__()
@require IJulia="7073ff75-c697-5162-941a-fcdaad2a7d2a" include("../ext/IJuliaExt.jl")
@require DataFrames="a93c6f00-e57d-5684-b7b6-d8193f3e46c0" include("../ext/DataFramesExt.jl")
@require Distributions="31c24e10-a181-5473-b8eb-7969acd0382f" include("../ext/DistributionsExt.jl")
@require Colors="5ae59095-9a9b-59fe-a467-6f913c188581" include("../ext/ColorsExt.jl")
@require JSON3="0f8b85d8-7281-11e9-16c2-39a750bddbf1" include("../ext/JSON3Ext.jl")
end
end # @static
Expand Down
2 changes: 2 additions & 0 deletions src/json.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ _json_lower(x::Union{Tuple,AbstractArray}) = _json_lower.(x)
_json_lower(d::Dict) = Dict{Any,Any}(k => _json_lower(v) for (k, v) in pairs(d))
_json_lower(a::HasFields) = Dict{Any,Any}(k => _json_lower(v) for (k, v) in pairs(a.fields))
_json_lower(c::Cycler) = c.vals

_json_lower(c::Colorant) = string("#", Colors.hex(c))
function _json_lower(c::ColorScheme)::Vector{Tuple{Float64,String}}
N = length(c.colors)
map(ic -> ((ic[1] - 1) / (N - 1), _json_lower(ic[2])), enumerate(c.colors))
Expand Down
Loading