Closed adrhill closed 2 years ago
Well, why not! 😃
using Colors, ColorSchemes
ColorScheme([parse(RGB, "#$(string(r, base=16))$(string(g, base=16))$(string(b, base=16))")
for r in 0x0:3:0xf for g in 0x0:3:0xf for b in 0x0:3:0xf])
Is this a useful order, or would another order be better?
That's a cool one-liner! The ordering looks good to me too. :)
You could code-golf this even further as
ColorScheme([parse(RGB, "#$(string.([r,g,b], base=16)...)") for r in 0x0:3:0xf for g in 0x0:3:0xf for b in 0x0:3:0xf])
at a small loss of performance.
Cool. Fortunately this package isn't smart enough to generate the schemes in code 😄
Thanks a lot!
For some legacy fun, it would be nice to have access to the web-safe color palette. The full color table can be found here.