Example usage for javafx.scene.paint Color hsb

List of usage examples for javafx.scene.paint Color hsb

Introduction

In this page you can find the example usage for javafx.scene.paint Color hsb.

Prototype

public static Color hsb(double hue, double saturation, double brightness, double opacity) 

Source Link

Document

Creates a Color based on the specified values in the HSB color model, and a given opacity.

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Text Fonts");
    Group root = new Group();
    Scene scene = new Scene(root, 550, 250, Color.hsb(270, 1.0, 1.0, 1.0));

    Text text = new Text(50, 100, "JavaFX 2.0 from Java2s.com");
    Font sanSerif = Font.font("Dialog", 30);
    text.setFont(sanSerif);// www .  j  a  v  a2 s . c o  m
    text.setFill(Color.RED);
    root.getChildren().add(text);

    primaryStage.setScene(scene);
    primaryStage.show();
}