This is the code I have to paint stars of a random color onto the background image. They need to have brightness as well. Any help here would be great!
/**
* Creates stars to be displayed on the background image.
* The parameter shows the number of stars on the background image.
*/
public void createRandomStars(int number)
{
GreenfootImage background = getBackground();
for(int i = 0; i < number; i++)
{
int x = Greenfoot.getRandomNumber(getWidth());
int y = Greenfoot.getRandomNumber(getHeight());
GreenfootImage image = new GreenfootImage(2, 2);
background.setColor(new Color(Greenfoot.getRandomNumber(255), Greenfoot.getRandomNumber(255),
Greenfoot.getRandomNumber(255)));
background.fillOval(Greenfoot.getRandomNumber(getWidth()), Greenfoot.getRandomNumber(getHeight()), 2, 2);
}
}