I need to create the rgb equivalent of a color with opacity.
Cristobal and I have been trying to recreate the colors used in FW's menus. I discovered that Windows apps (those that come with Windows, like Notepad) didn't use standard windows colors, like COLOR_MENU. But after much searching I found that they are adjusting the transparency of the color to create a new RGB color.
So, in order to keep using standard windows colors for interfaces, I would like to just change the opacity (transparency, luminosity) like the Windows apps do. Does anyone know how to do this?
I found this on a Microsoft site:
---------------------------------
Using other colors
While the Windows theme defines a comprehensive set of theme parts, you may find that your program needs colors that aren't defined in the theme file. While you could hardwire such colors, a better approach is to derive colors from the theme or system colors. Strategically using this approach gives you all the benefits of using theme and system colors, but with much more flexibility.
For example, suppose you need a window background that is darker than the theme window background color. In the HSL color space, having a darker color means a color with a lower luminosity. Thus, you can derive a darker window background color using the following steps:
•Obtain the window background theme color RGB.
•Convert the RGB to its HSL value.
•Reduce the luminosity value (by, say, 20 percent).
•Convert back to RGB values.
https://msdn.microsoft.com/en-us/library/windows/desktop/dn742482(v=vs.85).aspx
------------------------------------------
Any ideas on how to do this?
James