r/MathHelp • u/HyoscineIsLockedOut • Sep 23 '20
Compensating for a logarithmic perception of a linear progression...
Hi! Please excuse the preamble, but I think my approach to something has been fundamentally flawed, so I'm hoping to convey what I've been trying to work out...
I've been trying to come up with an eight colour, monochrome palette for an art project. After deciding I wanted something a bit more muted than absolute black to pure white, I went with eigengrau converted to greyscale for the darkest colour, to the lightest point I could find in a frame from an old Carl Dreyer film.
In Photoshop, this gives me a lightness value of 7 for my darkest colour, and 80 for the lightest. I then chose my remaining six colours at equidistant intervals. Which gives the following numbers...
07.00000000000000 17.42857142857143 27.85714285714286 38.28571428571429 48.71428571428572 59.14285714285715 69.57142857142858 80.00000000000000
When I actually made a swatch with these lightness values though, it looked off. The difference between the darker shades seemed greater than the difference between the lighter ones. In trying to figure out why, I learnt that perception of brightness is broadly logarithmic. So I've been attempting to figure out what this means exactly, and how to apply it to my palette. I'm very much in over my head here, but I thought I'd play with the numbers and see what I got back.
My approach was to take the numbers above, and find their log with the Windows calculator. This gives me the following numbers...
0.84509804001425683071221625859264 1.24126179066049143398517950261470 1.44493657134826122511860169282920 1.58303675401453204247944710447630 1.68765633897824094064832205361950 1.77190230110664217041037993934400 1.84243092120037755525749581651070 1.90308998699194358564121668417350
I added these together to get...
12.3194127043147457842528590521610
...and then I divided my log numbers by the total above, and multiplied them by 80 to get numbers I could use as intervals on my original 7 to 80 scale. I got the following...
5.4879112197825473171352226250723 8.0605257438985054252193891760999 9.3831523046041781813344688770443 10.279949487917325367550366382655 10.959329828358826965567758457185 11.506407609746213787186697834818 11.964407495205256628798503952076 12.358316310487146327207592695047
I realised I had made a mistake about halfway through trying to work with those intervals. With the above, the lower the number, the bigger the jump to the next. This is the very thing I wanted to compensate for. I need smaller intervals between lower numbers.
I'm at a loss for how to fix this. I suspect now what I actually need is an exponential progression to counter the logarithmic perception of the linear; for there to be a greater difference between the lighter colours in my palette. I've no idea how to achieve this though. If someone could point me in the right direction, I'd be incredibly grateful. Thank you!
~edit~
Hold up, I think I figured it out literally as soon as I stood up after posting this. As per the rules though, I don't want to delete my post. I'll edit this again after trying something...
~another edit~
Yep... Taking my original numbers, squaring them, adding all those together, then dividing the squared numbers by the square total and multiplying them by 80 gives me a really nice result. Thanks for reading, and sorry if you spent any time trying to help me with this before I arrived at the answer.
2
u/Real_Trumpet63 Sep 24 '20
I know you've already got an answer that satisfies you, but I thought of a general approach that might prove useful. You've essentially defined an exponential curve fitting problem, or maybe you could call it exponential interpolation? But anyways, you can solve it algebraicly:
Find the function f(x) = a*exp(b*x) such that f(0) = 7 and f(7) = 80. Then f(1), f(2), etc. will be your intermediate lightnesses.
1
u/HyoscineIsLockedOut Sep 24 '20
Thank you! I decided last night that I wanted try this with the addition of a slight colour gradient, so I've plenty more sums to do. Anything that might speed the process up is greatly appreciated.
1
u/AutoModerator Sep 23 '20
Reminder:
What have you tried so far? (See Rule #2)
Please don't delete your post. (See Rule #7)
We, the moderators of /r/MathHelp, appreciate that your question contributes to the MathHelp archived questions that will help others searching for similar answers in the future. Thank you for obeying these instructions.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Bale11235 Sep 23 '20
I have very little basis for this apart from pure intuition put potentially taking the reciprocal of the number before finding it’s log would reverse the interval spacing? I would check it but can’t currently get to anything other than my phone.