Mrs. Johnson's Classroom
  • HOME
    • Tutoring/Make-Up
    • Classroom Rules
  • CompuScholar - Instructions
FORMULA: Create a Custom Color Name
First you need to create the colors you want......
Color
unicornPink = new Color (255, 182, 193);


Then you can use then when you want....
g.setColor(unicornPink);

​
or 

g.setColor(new Color (_____,_____,_____));
//place your Red, Green, Blue numbers into the parameters. Remember, once you set a color, all the code below this line will become this color. You can re-set colors as many times as you would like. The computer only remembers the last color you set.

GOOD WEBSITE TO USE TO FIND YOUR COLORS RGB: 
http://www.rapidtables.com/web/color/RGB_Color.htm 


Powered by Create your own unique website with customizable templates.