Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As its name suggests, its a Unicolor, which is white <a href="http://jcaptcha.sourceforge.net/apidocs/1.0/com/octo/captcha/component/image/backgroundgenerator/UniColorBackgroundGenerator.html" rel="nofollow noreferrer">according to the specs</a>. You can't pass Color as an argument to its constructor. The constructor just take 2 arguments, length and height, respectively. The color will be white and that makes it useless in your case.</p> <p>Now try any of these to achieve your desired thing. The first one is simple, where you can define multiple colors.</p> <ul> <li><a href="http://jcaptcha.sourceforge.net/apidocs/1.0/com/octo/captcha/component/image/backgroundgenerator/FunkyBackgroundGenerator.html" rel="nofollow noreferrer">FunkyBackgroundGenerator</a>, it can be used for gradient too.</li> <li><a href="http://jcaptcha.sourceforge.net/apidocs/1.0/com/octo/captcha/component/image/backgroundgenerator/MultipleShapeBackgroundGenerator.html" rel="nofollow noreferrer">MultipleShapeBackgroundGenerator</a></li> <li><a href="http://jcaptcha.sourceforge.net/apidocs/1.0/com/octo/captcha/component/image/backgroundgenerator/FileReaderRandomBackgroundGenerator.html" rel="nofollow noreferrer">FileReaderRandomBackgroundGenerator</a></li> </ul> <p>Thanks for the Javadocs link. :)</p> <p><strong>[Edited]</strong></p> <p>A spoon feed below, based on your given code.</p> <pre><code>protected void buildInitialFactories() { ColorGenerator cg = new SingleColorGenerator(Color.blue); BackgroundGenerator background = new FunkyBackgroundGenerator(250, 100, cg); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload