Click here to Skip to main content
15,909,835 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Color Ranges Pin
Luc Pattyn20-Jul-07 5:45
sitebuilderLuc Pattyn20-Jul-07 5:45 
GeneralRe: Color Ranges Pin
Malcolm Smart20-Jul-07 10:37
Malcolm Smart20-Jul-07 10:37 
GeneralRe: Color Ranges Pin
Paul Conrad20-Jul-07 10:40
professionalPaul Conrad20-Jul-07 10:40 
GeneralRe: Color Ranges Pin
Malcolm Smart20-Jul-07 11:22
Malcolm Smart20-Jul-07 11:22 
GeneralRe: Color Ranges Pin
Paul Conrad20-Jul-07 11:27
professionalPaul Conrad20-Jul-07 11:27 
GeneralRe: Color Ranges Pin
Luc Pattyn20-Jul-07 15:42
sitebuilderLuc Pattyn20-Jul-07 15:42 
AnswerRe: Color Ranges Pin
CPallini20-Jul-07 11:33
mveCPallini20-Jul-07 11:33 
GeneralRe: Color Ranges Pin
Luc Pattyn21-Jul-07 3:49
sitebuilderLuc Pattyn21-Jul-07 3:49 
Hi CPallini,


There is lots of discussion about brightness, luminance, intensity, etc,
most often the formulas used are linear ones, or they rely on MAX(r,g,b) and/or MIN(r,g,b).
Your sqrt is an interesting twist.


Here are five samples of your formulas
n =    0%  25%  50%  75%  100%

g(n) 100%  92%  70%  38%    0%
r(n)   0%  38%  70%  92%  100%


and they match very closely with what MS Word is offering with their "Fill Gradient between
Two Colors".

Well done !

BTW: curious how you would solve it if you are not as lucky as to find one of (r,g,b)
at a constant value tho.

Smile | :)


GeneralRe: Color Ranges Pin
Malcolm Smart21-Jul-07 3:58
Malcolm Smart21-Jul-07 3:58 
GeneralRe: Color Ranges Pin
Luc Pattyn21-Jul-07 4:03
sitebuilderLuc Pattyn21-Jul-07 4:03 
GeneralRe: Color Ranges Pin
CPallini21-Jul-07 10:14
mveCPallini21-Jul-07 10:14 
GeneralRe: Color Ranges Pin
Malcolm Smart22-Jul-07 21:20
Malcolm Smart22-Jul-07 21:20 
GeneralRe: Color Ranges Pin
CPallini22-Jul-07 21:28
mveCPallini22-Jul-07 21:28 
GeneralRe: Color Ranges Pin
Malcolm Smart22-Jul-07 23:33
Malcolm Smart22-Jul-07 23:33 
GeneralRe: Color Ranges Pin
CPallini22-Jul-07 23:41
mveCPallini22-Jul-07 23:41 
Questionfinding all recurring elements in an array Pin
Rocky#17-Jul-07 6:40
Rocky#17-Jul-07 6:40 
AnswerRe: finding all recurring elements in an array Pin
El Corazon17-Jul-07 6:56
El Corazon17-Jul-07 6:56 
GeneralRe: finding all recurring elements in an array Pin
Dan Neely17-Jul-07 7:08
Dan Neely17-Jul-07 7:08 
GeneralRe: finding all recurring elements in an array Pin
El Corazon17-Jul-07 7:11
El Corazon17-Jul-07 7:11 
GeneralRe: finding all recurring elements in an array Pin
Rocky#17-Jul-07 7:13
Rocky#17-Jul-07 7:13 
AnswerRe: finding all recurring elements in an array Pin
Luc Pattyn17-Jul-07 7:28
sitebuilderLuc Pattyn17-Jul-07 7:28 
AnswerRe: finding all recurring elements in an array Pin
PICguy22-Jul-07 12:10
PICguy22-Jul-07 12:10 
QuestionInteresting math magic? Pin
Paul Conrad15-Jul-07 12:35
professionalPaul Conrad15-Jul-07 12:35 
AnswerRe: Interesting math magic? Pin
cp987616-Jul-07 12:49
cp987616-Jul-07 12:49 
AnswerRe: Interesting math magic? Pin
MarkB77716-Jul-07 23:14
MarkB77716-Jul-07 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.