AJ Farkas

front-end architect

Headshot of AJ

My focus is on mobile-friendly, responsive websites.
JavaScript is my current obsession.

Sites I designed and built:

Fine art portfolio

Wedding site

One of my snippets on CodePen:

See the Pen Loading animation by AJ Farkas (@ajfarkas) on CodePen.

One of my JS plugins on GitHub:

Automatic Color Leveling

	/* Automatic color leveling for HTML images */	  		
	...
	for(var i = 0; i < pixelNum; i += 4){
		//set min and max values for each color
		if (imgData.data[i] > redMax) { redMax = imgData.data[i] };
		if (imgData.data[i] < redMin) { redMin = imgData.data[i] };
		if (imgData.data[i+1] > greenMax) { greenMax = imgData.data[i+1] };
		if (imgData.data[i+1] < greenMin) { greenMin = imgData.data[i+1] };
		if (imgData.data[i+2] > blueMax) { blueMax = imgData.data[i+2] };
		if (imgData.data[i+2] < blueMin) { blueMin = imgData.data[i+2] };
	}

	for(var i = 0; i < pixelNum; i += 4){
		//map colors to 0 - 255 range
		imgData.data[i] = (imgData.data[i] - redMin) * (255 / (redMax - redMin));
		imgData.data[i+1] = (imgData.data[i+1] - greenMin) * (255 / (greenMax - greenMin));
		imgData.data[i+2] = (imgData.data[i+2] - blueMin) * (255 / (blueMax - blueMin));
	}
	...
		  		

Automatic color leveling for website img elements. This JS script will sort through each img on the page and apply a basic color correction, improving the quality of images for people who don't have—or want to meddle with—image editing software.