O'Reilly logo

Learn JavaFX 8: Building User Experience and Interfaces with Java 8 by Kishori Sharan

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 7

image

Playing with Colors

In this chapter, you will learn:

  • How colors are represented in JavaFX
  • What different color patterns are
  • How to use image pattern
  • How to use linear color gradient
  • How to use radial color gradient

Understanding Colors

In JavaFX, you can specify color for text and background color for regions. You can specify a color as a uniform color, an image pattern, or a color gradient. A uniform color uses the same color to fill the entire region. An image pattern lets you fill a region with an image pattern. A color gradient defines a color pattern in which the color varies along a straight line from one color to another. The ...

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