LeibTon- My Personal Site

Aditya Prakash
2 min readFeb 6, 2021

Why LeibTon?

I searched for a name not particularly for my site but a nickname for my social media handles. I was thinking of something that sounds nerdy. In the process came Calculus, and the two great legends who started it: Leibniz and Newton and thus I got the idea of LeibTon. This name attracted me a lot, and when I thought of making my site, I decided to name it: LeibTon.

Color Scheme of My Picture in About Page.

In my about page, I have used canvas to provide image effects using particles. The color scheme of my image matches the background.

Original Image
Image on About Page.

Basically, In Canvas, Every pixel of image is rendered as a particle object and then worked upon it. If you wish to learn about it, this is an excellent tutorial. So during rendering, I wanted to choose each pixel’s RGB value such that I get a color scheme as shown in the image just above.

What I did?

Let’s say the RGB value of the background is (255, 138,128). Calculate the average of it; it comes out to be 174(rounded).

For each pixel of the image, let the RGB value be (r, g, b). Find it’s average,

Then, the final RGB of pixel to be used in canvas is calculated as:

Hence, the RGB of the pixel taken as example is:

And we get a pleasant combination of image and background, instead of contrasting one.

Complete Canvas Code is here.

Enjoy !!

--

--