I have a few images similar to this one:
As you can see, there is a large difference between the shadows and highlights in the image. Most of the image is ok to put white text over, but sometimes my text goes over a bright spot, making it unreadable, so I want to lower the brightness of only the image's highlights (like you can do in most standard photo apps) using css, while keeping the shadows and mid-brightnes areas as they are. I can find lots of help on how to darken an entire image, but nothing on how to darken only the highlights. I was thinking background-blend-mode might work, but I have no idea how to use it, or which effect would be right.
How to darken/lower background image highlights with css?
472 Views Asked by Finn E At
1
There are 1 best solutions below
Related Questions in CSS
- How to use custom font during html to pdf conversion?
- Storing the preferred font-size in localStorage
- mp4 embedded videos within github pages website not loading
- Is there any way to glow this bulb image like a real light bulb
- What can I do to improve my coding on both html and css
- Uncaught TypeError: google.maps.LatLng is not a constructor at init (script.js:7:13)
- Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
- How to increase quality of mathjax output?
- Hover animation resetting( seemingly reverting back to original CSS and then again to hover)when moving mouse horizontaly accross a part of an element
- Storing selected language in localStorage
- How to clip grid cell and provide scroll as well?
- KeyboardAvoidingView makes a messy the flexbox
- Rotate an object around another object in javascript
- Understanding Scroll Anchoring Behavoir
- how to use only block layout in this css code?
Related Questions in BRIGHTNESS
- Controlling Brightness of tablet with Qt Android
- Android- How to set brightness to textView?
- Adaptive brightness in android
- How do I increase the brightness of an image in java?
- Simulate sleep mode on iPad
- Sharedpreferences toggle state?
- Check current Brightness android
- Adjust webcam brightness (exposure/gain) C#
- Change CSS-Style Color Value with JavaScript
- Image brightness for big images c#
- ACPI event not triggering associated action
- Determining Image Luminance/Brightness
- Can't apply system screen brightness programmatically in Android
- iphone - Change the screen brightness, like iBook does
- Several issues considering an iPhone wake-up light app
Related Questions in IMAGE-EDITING
- Python, OpenCV - drawContours of overlapping regions, some pixels are excluded?
- Detecting first inner black circle and making a contour: openCV and Python
- Highlight the changes or areas of discrepancy between the two images
- How do I view an image in Visual Studio 2022 when coding?
- How to measure the width of white object inside the image
- Python PIL circle crop image from corner
- For loop for image editing: use output image from the loop as input for the next iteration
- What could be causing my Elementor editing interface to only show text instead of images on my new template?
- How can i remove existing CIFilter from an image in iOS?
- crop image in react-native in background
- How to Draw on an Image and save it in React Native Expo
- Reducing the pixels-per-inch (PPI) of an image results in same file size
- Fabric.js IText interaction issue, moving but not editing
- Importing crop_your_image package in a particular flutter project results in an error
- How do I get started automating my workflow for enhancing and editing photos using Remini web app and photoshop?
Related Questions in BACKGROUND-BLEND-MODE
- How could I blend two png images and mix the content outline of one of the png images?
- Adjusting the background color only changes the color of the hair, and leaving the white space transparent via background-blend-mode or mix-blend-mode
- Background-blend-mode set to screen does not work on mobile
- How to darken/lower background image highlights with css?
- Blend mode with parent DIV
- CSS background blend mode black mask
- Blend two backgrounds with two imgs
- Imagemagick replicate css mask-image and background-blend-mode rules
- How to reduce the opacity of a background-blend-mode
- background-blend-mode not working on Safari CSS
- Background-blend-mode not working on mobile
- Remove or blend background of video using CSS?
- CSS background-blend-mode not working in chrome mobile with viewport meta tag
- Creating photoshop layer blend effects in CSS
- rotate a image within background-blend-mode
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You're right, background-blend-mode may be your simplest option! For more information about background-blend-mode, click here, but it more or less combines all of an element's background images by using a set of blend modes. For a description of the different blend modes, click here.
In the example below, the important lines are:
These lines do the following:
• It gives the div three images: two that are your image, and one that is a solid color with a lightness of 50%.
• It applies the 'color' blend mode to the first image, the 'darken' blend mode to the second image, and the 'normal' blend mode to the solid color.
This means that the second image's lightest color will match that 50% lightness solid color, and the first image will restore the color that was lost when doing so.
Unfortunately, this does not work with transparent images, as the transparency will most likely be replaced with the solid gray color created by the linear-gradient().
Hopefully this solution is useful to you!