The two images above are images from a ray marcher, the dots are points on a sphere, but I need these points to be less dense at the poles.
Here is a link to the code, https://paste-bin.xyz/70717
This is written on a mobile app so if you are interested in seeing it here is the link to the app https://play.google.com/store/apps/details?id=io.oceanos.shaderbox
If you have a way to edit and display shaders, color correction can be as simple or as complex as you want it to be.
Typically, your input will be RGB. To operate only on the luminous information, would covert that RGB in the shader to YCbCr, use a gamma correction equation on the Y(luminous part of the values), and finally convert it back out to RGB. The gamma correction equation is the same as a LUT, just doing the math every pixel-no back projection map/table saved anywhere. That's the simple way to do it.
People have other methods. Worth looking up Color Correction on shadertoy to see other people's implementations.
If you want to learn a bit more about image processing and the math involved... I recommend A Simplified Approach to Image Processing by Randy Crane. Book is super cheap on some book sites. The math doesn't require an electrical engineering degree to understand.