using ImageShow
using ImageCore
using OffsetArrays
function colorwheel(sz::Dims{2}, v=1)
# H, S
canvas = OffsetArrays.centered(fill(ARGB(0, 0, 0, 0), sz))
for I in CartesianIndices(canvas)
x, y = I.I ./ (size(canvas) .÷ 2)
r = sqrt(x*x+y*y)
if r < 1
h = atand(y, x)
canvas[I] = RGB(HSV(h, r, v))
end
end
return canvas
end
This generates the widely used color wheel
colorwheel((1024, 1024))
I'm wondering if this should be put here or TestImages.
This generates the widely used color wheel
I'm wondering if this should be put here or TestImages.