pyparty icon indicating copy to clipboard operation
pyparty copied to clipboard

Better naming conventions for colors

Open hughesadam87 opened this issue 11 years ago • 1 comments

So I have the following:

to_normrgb (Takes colors, but not arrays) rgb2uint (takes arrays) any2rgb (takes arrays)

For completeness, need a to_normgray or something. The only time I've needed this so far is in noise._parse intensity()

if img.ndim == 2:
    r,g,b = intensity
    intensity = 0.2125 * r + 0.7154 * g + 0.0721 * b

If possible, shouldn't only 2 of these be required:

any2rgb any2uint

hughesadam87 avatar Feb 22 '14 21:02 hughesadam87

Made any2uint, no super well-tested, but used in mc.from_labels( mapper = ...)

Also any2rgb should handle non-arrays just by wrapping to_normrgb() any2bool also needs there

hughesadam87 avatar Apr 14 '14 21:04 hughesadam87