You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using ImageCore
using OffsetArrays
functioncolorwheel(sz::Dims{2}, v=1)
# H, S
canvas = OffsetArrays.centered(fill(ARGB(0, 0, 0, 0), sz))
for I inCartesianIndices(canvas)
x, y = I.I ./ (size(canvas) .÷2)
r =sqrt(x*x+y*y)
if r <1
h =atand(x, y) +90
canvas[I] =RGB(HSV(h, r, v))
endendreturn canvas
endcolorwheel((1024, 1024))
One main concern is that Colors.jl does not have the ability to display images. We need ImageShow.jl etc.
Another concern is that user preferences may be diverse.
For example, whether to set 0° to the right or top, clockwise or counterclockwise, what background color, how many margins, etc.
I don't think it is necessary to address all of them, but it is better to be able to extend the wheel with kwargs.
So, how about adding a ColorWheel type that only holds settings, and rendering the instance when display-ed or show-ed, as we do in the Colors.jl documentation?
This generates the widely used color wheel https://commons.wikimedia.org/wiki/File:Color_circle_(RGB).svg
I use this for visualization test purposes. I'm wondering if this should be put here or TestImages.
The text was updated successfully, but these errors were encountered: