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

transparent should not fall back to black #84

Open
karolk opened this issue Apr 4, 2013 · 2 comments
Open

transparent should not fall back to black #84

karolk opened this issue Apr 4, 2013 · 2 comments

Comments

@karolk
Copy link

karolk commented Apr 4, 2013

When you type transparent in the input field and press enter it changes to #000000. This is a bit misleading for the user. Ideally it would not change the position of the dragger and kept the name as 'transparent'.

http://jsbin.com/iroqoq/1/edit

@bgrins
Copy link
Owner

bgrins commented Apr 5, 2013

I see that. Part of the issue is the display is driven by a preferredFormat, but I could see just having a special case for transparent where it doesn't use that format (and possibly also doesn't move the dragger). What should happen at that point if they start dragging around afterwards though? Typically, if showAlpha is false it doesn't allow any alpha so I don't have to deal with this case (try typing in 'rgba 100 100 100 .5'), but I guess that 'transparent' is allowed for whatever reason.

I suppose you could just manually handle it, as in something like this: #83

@Ahjira
Copy link

Ahjira commented Oct 27, 2013

I can see a case for this either way. It depends on what the user is trying to do. Spectrum does not have a "clear" option so if I set a color to entirely transparent, I'm usually trying to clear the color and in that case, I'd prefer it did reset to black because that intuitively tells me "no color". I would consider this in light of the fact you may eventually have a clear option. If so, then leaving the color in tact when alpha is 0 provides a clear second use case. Right now it doesn't.

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

No branches or pull requests

3 participants