Gaston: handle multiple colors

This commit is contained in:
t-bltg 2021-07-30 13:09:59 +02:00 committed by GitHub
parent 01d5ff1580
commit 74b70fc039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,9 +434,13 @@ function gaston_marker(marker)
end
function gaston_color(color, alpha=0.)
col = single_color(color) # in case of gradients
col = alphacolor(col, alpha == nothing ? 0. : alpha) # add a default alpha if non existent
return "rgb \"#$(hex(col, :aarrggbb))\""
if isvector(color)
return gaston_color.(color)
else
col = single_color(color) # in case of gradients
col = alphacolor(col, alpha == nothing ? 0. : alpha) # add a default alpha if non existent
return "rgb \"#$(hex(col, :aarrggbb))\""
end
end
function gaston_linestyle(style)