Skip to content

Commit

Permalink
Merge pull request #60 from daschw/stickyalpha
Browse files Browse the repository at this point in the history
don't save alpha state for gradients
  • Loading branch information
daschw authored Apr 12, 2019
2 parents bec5632 + ad1fc5f commit 22abcbf
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/color_gradients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,7 @@ function _color_list(arg, ::Nothing)
cgrad_colors(arg)
end

function _color_list(arg, alpha)
colors = cgrad_colors(arg)
for i in eachindex(colors)
colors[i] = RGBA{Float64}(convert(RGB{Float64}, colors[i]), alpha)
end
colors
end
_color_list(arg, alpha) = RGBA{Float64}.(convert.(RGB{Float64}, cgrad_colors(arg)), alpha)

cgrad(arg::Symbol, cl::Symbol, values; kw...) = cgrad(cgrad_colors(arg, color_library = cl), values; kw...)

Expand Down

0 comments on commit 22abcbf

Please sign in to comment.