Example usage for javafx.scene.paint Color MAGENTA

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

Introduction

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

Prototype

Color MAGENTA

To view the source code for javafx.scene.paint Color MAGENTA.

Click Source Link

Document

The color magenta with an RGB value of #FF00FF

Usage

From source file:net.rptools.tokentool.util.ImageUtil.java

private static boolean isMagenta(Color color, int fudge) {
    if (color.equals(Color.MAGENTA))
        return true;

    double r = color.getRed();
    double g = color.getGreen();
    double b = color.getBlue();

    if (Math.abs(r - b) > fudge)
        return false;

    if (g > r - fudge || g > b - fudge)
        return false;

    return true;/*from w w w .j a v a2 s.  c  om*/
}