OpenCart – Adjusting Captcha

This article will be a basic guide on how to change the OpenCart Captcha to something of your liking. Some people aren’t happy with the default colors that the captcha generates so we will tell you how to change those. The captcha, as you know can be found on pages like contact form, and registration. Below is a picture example of what it looks like:

You have default 3 colors for the captcha. Sometimes these colors just don’t jive with your opencart theme so we will now show you how to change them. The colors are actually generated by PHP believe it or not and the file is easily accessible. Open up the following file: /system/library/captcha.php

This function’s job is to create a new image every time it is accessed. It is accessed every time you refresh your page on the front end (ie:user side). Get familiar with RGB. RGB is a system to create all types of colors along the spectrum. The code that you will want to change to get the new colors is here: