heliosdrm / GRUtils.jl

Tools for using the GR framework in Julia
Other
31 stars 6 forks source link

rbg color does not seems produce the correct color #82

Closed danielchen26 closed 3 years ago

danielchen26 commented 3 years ago
# try to set the line color to be yellow-green line (curved)
plot(exp.(LinRange(-1, 0, 10)), linecolor=GRUtils.color(160, 197, 77)) 

the RGB color (160, 197, 77) suppose to be yellow-green, but it actually produces a blue-ish color. Something is not correct here.

heliosdrm commented 3 years ago

Hi. Thanks for commenting. The color indices of GRUtils.color are expected to be between 0 and 1, not integers between 0 and 255. Divide the indices between 255 and you'll get the result you want. Cf. https://heliosdrm.github.io/GRUtils.jl/stable/color/