Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better naming conventions for colors #39

Open
hughesadam87 opened this issue Feb 22, 2014 · 1 comment
Open

Better naming conventions for colors #39

hughesadam87 opened this issue Feb 22, 2014 · 1 comment

Comments

@hughesadam87
Copy link
Owner

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant