This site requires JavaScript, please enable it in your browser!
Greenfoot back
Caotianyu
Caotianyu wrote ...

2017/5/20

Missing Colors in Greenfoot.Color

Caotianyu Caotianyu

2017/5/20

#
So 3.1.0 replaced Java.awt.color with Greenfoot.color. I thought Greenfoot.color would include all the colors in java.awt.color. But I found out that this is not the case. I used darkGray and lightGray in my project, which are colors included in java.awt.color. When I tried to update to 3.1.0, I did the proper conversion, but Greenfoot.color won't recognize darkGray and lightGray. I need many colors for my project and I already used up all the other colors. I know how to use values to define a custom color, but the missing colors cause lots of inconvenience. I hope this can be fixed in the next update.
danpost danpost

2017/5/20

#
I does not appear that greenfoot recognizes any of the colors that java has using lowercase characters. You can still use DARK_GRAY and LIGHT_GRAY, however.
Yehuda Yehuda

2017/5/21

#
It think Java originally had lowercase letters then added in the capital letters since the colors are constants. Greenfoot only used the constant named fields, which are the same colors as the lowercase ones.
You need to login to post a reply.