Microsoft
Software
Hardware
Network
Question : Calculating RGBA given different RGB colours.
Hello,
I have three RGB colours, background, foreground and target. The target colour is always between the background and foreground colours. Now, given these three RGB colours, I want to find out what the alpha channel of the foreground colour should be to give the closest approximation of the target colour that only had the RGB channels.
Any ideas on where I can even start this thing???
Thanks,
Uni
Answer : Calculating RGBA given different RGB colours.
depending n how you define closest, it may be
(rt+gt+bt)-(rb+gb+bb)/((rf
+gf+bf)-(r
b+gb+bb))
or
((rt-rb)/(rf-rb)+(gt-gb)/(
gf-gb)+(bt
-bb)/(bf-b
b))/3
perhaps with gamma or other correction
Random Solutions
Bad Request error
FAXCOOLWAREZ037 192.168.1.38 00-1A-73-C3-39-8A
Autoplay Synctoy when USB harddrive plugged in
ASA 5505 DMZ won't Access Internet
Vista - "Open With" Not Allowing An Associated Program To Be Selected By Browsing
Cloud Computing
Remote connectivity to Microsoft OCS 2007 R2 Fails
Web Interface 5.3 PNAgent Site - Citrix Online Plug-in could not contact the server entered.
Group Policy settings for BitLocker startup options are in conflict
Connect to exchange using FVS318 VPN Firewall