O'Reilly logo

JavaFX™: A Beginner’s Guide by J. F. DiMarzio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5Using Colors and Gradients

Key Skills & Concepts

• Creating mixed colors

• Applying colors to shapes

• Using gradients

In this chapter you explore more deeply the powerful coloring and gradient tools available to you in JavaFX. In Chapter 4 you learned how to apply some basic, pre-created colors to shapes. In this chapter you learn how to mix your own colors, and you apply these colors to shapes and use them in gradients.

Using Color

The Color class is a very powerful class. In the last chapter you used a very small part of the Color class to fill a Line node with a solid color. You used just one or two of the 148 predefined colors of the Color class. This is a small sample of what the Color class is capable of.

The Color class can be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required