-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support transparency (8 digit hex code:) for categorical variables? #79
Comments
Hmm, we implemented something like this for ncWMS quite a while ago but used #AARRGGBB, rather than #RRGGBBAA. That's the current way of doing it. But if the #RRGGBBAA is becoming more standard, perhaps we should switch to that? @jonblower - any thoughts? |
Just had a browse of the code and changing formats now is a definite no. ncWMS writes out the full 8-digit notation into config files so changing it would break existing configs. Also, a quick Google suggests that the term #AARRGGBB occurs about twice as often as #RRGGBBAA, so it doesn't seem like it's been standardised in any way, but we're using the most common representation. |
@guygriffiths, this is great! I certainly don't care about how transparency is specified, I just didn't even know that it was a possibility! I was looking at the documentation on categorical data: |
I was wondering to specify a transparent value for one of my category values to ncWMS, and found this discussion of an 8-digit specification:
http://stackoverflow.com/a/39718004
The first 6 digits are interpreted identically to the 6-digit notation. The last pair of digits, interpreted as a hexadecimal number, specifies the alpha channel of the color, where 00 represents a fully transparent color and ff represent a fully opaque color.
So a specification of #0000ffcc represents the same color as rgba(0, 0, 100%, 80%) (a slightly-transparent blue).
Could this be used in ncWMS?
Or is there another way to specify transparent color?
The text was updated successfully, but these errors were encountered: