For darken (and probably lighten too), you would want to calculate the difference between the lightness values of both colors: @function color-difference($c1, $c2) { $c1: lightness($c1); $c2: lightness($c2); @return max($c1, $c2) - min($c1, $c2); } $color1: #e8e8e8; $color2: #c1c1c1; .foo { // guessed the percentage manually test: darken($color1, 15.25%); //...
Here is your solution. Just move the input buttons outside div.overlay that you're darkening. You only need to change your HTML so: <div class="show-image"> <div class="image"> <div class="overlay"> </div> <input class="update" type="button" value="Update" /> <input class="delete" type="button" value="Delete" /> </div> </div> Unlike @philnash's solution, doesn't need z-index, as the input...
button,javafx,hover,transitions,darken
You could use a ColorAdjust effect and change it's brightness property using a Timeline. public class ButtonFadeDemo extends Application { @Override public void start(Stage primaryStage) { try { Pane root = new Pane(); Button button = new Button("Click me!"); ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setBrightness(0.0); button.setEffect(colorAdjust); button.setOnMouseEntered(e -> { Timeline...