Adjustable UI brightness in JavaFX
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md
black.png
grey.png
white.png

README.md

JavaFX Brightness Example

This example shows how you can dynamically control the brightness of your application with a style binding. In the example I used a slider to set the brightness.

Parent root = ...

StringExpression styleString =
    Bindings.format("-fx-base:rgb(%1$.0f , %1$.0f, %1$.0f)", brightness.multiply(2.55));

root.styleProperty().bind(styleString);

Run the example

To run the example you need an installed JDK in version 8.

cd src
javac App.java
java App

Dark:

dark

Medium:

medium

Light:

light