.generateRandomColor(endingColor);
// Generate random CAPTCHA text.
captchaText = CAPTCHATextGenerator.generateRandomText();
TomahawkConfig config = TomahawkConfig.getCurrentInstance(facesContext);
// Set the generated text in the user session.
facesContext.getExternalContext().getSessionMap().put(
config.isPrefixCaptchaSessionKey() ?
AbstractCAPTCHAComponent.ATTRIBUTE_CAPTCHA_SESSION_KEY_NAME+
"_"+captchaSessionKeyName : captchaSessionKeyName, captchaText);
// Generate the image, the BG color is randomized from starting to ending colors.
captchaImageGenerator.generateImage(response, captchaText,