weslly / ColorPicker

Color picker for Sublime Text
http://weslly.github.io/ColorPicker
511 stars 108 forks source link

No opacity slider in Mac OS X version? #35

Open missingfoot opened 11 years ago

missingfoot commented 11 years ago

Hi, the screenshot shows the opacity slider, however I'm not seeing that myself, am I missing something or has that been removed? I assume it would be possible if it were there, to generate rgba values?

Thanks!

designbyadrian commented 10 years ago

I too have this question! Is it because I'm highlighting a hex-code? Or using Mavericks?

jonathanhirz commented 10 years ago

+1, not seeing opacity on Mavericks

jonathanhirz commented 10 years ago

Has anyone solved this? I don't have an opacity slider on any of my color picker dialogs, even from other applications. Kind of annoying and I can't find a way to get it back.

pri-mo commented 9 years ago

Same here ST3 on OS X 10.10.3

noelforte commented 9 years ago

I also have this issue. Any news when this might be resolved?

habovh commented 8 years ago

The answer

Opacity cannot be included in hex codes. It must be handled differently depending on what you are doing.

You must understand that Hexadecimal color codes only contain 3 values (R, G, B) encoded in hexadecimal from 00 to FF for each of them (decimal equivalent: from 0 to 255). 0 being the lowest amount of a given color (let's say 0%), FF the highest (let's say 100%).

Therefore, #000000 is black (0% Red, 0% Green, 0% Blue) and #FFFFFF is white (100% Red, 100% Green, 100% Blue) (Remember in elementary school when you learned that if you mix the 3 primary colours you get white? It's magic)

Composition of a hexadecimal color code

Hex prefix Red Green Blue
# 00 to FF 00 to FF 00 to FF

Deal with transparency

On the web

Elsewhere

Another example, not dev related, if you want to have a transparent brush in Photoshop you would need to adjust your brush opacity, but this will still be independent of the actual color. Then the resulting image (if the chosen format handles the Alpha channel, like PNG), would include transparency.