Created
January 5, 2018 10:29
-
-
Save team172011/8ef8de020d146fa6c37bf311d26e01ec to your computer and use it in GitHub Desktop.
java.awt.Color to javafx.scene.paint.Color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
/** | |
* Returns a javaFX Color object that represents the same color as the awt color object | |
* @param c a java.awt.Color object | |
*/ | |
private javafx.scene.paint.Color awtColorToJavaFX(Color c) { | |
return javafx.scene.paint.Color.rgb(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha() / 255.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment