This problem can be solved in a similar manner to the previous one with the national flag. If you haven’t done that one first, I recommend that you do so before continuing with this one.
There are basically three elements that the image must have:
- A gradient-color background. This can be achieved by drawing lines (vertically or horizontally) of a different color from one side to the other of the image. Drawing lines can be done with the pngwriter::line() function. There are several overloads available; the one used in the following code takes the start and end position and three values for the red, green, and blue channels of the RGB color space.
- A random text with letters displayed at various random ...