Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change text color depending on background image / color

on this page i have the first div as a dark image and the second as a light background.

i want the sidebar text color to be light on the dark image and dark on the light.

how would i set the color according to what div is in the background? just need it for two color options.

this is another example of what I'm looking for http://www.acnestudios.com/ example html:

 <div id="home_wrapper">
    <div id="home_top_t_wrap"> <!-- DARK BACKGROUND -->
        <h1 class="top_text_h1"> Shop New York Like Never Before </h1> <!-- TEXT THAT NEEDS TO GO FROM LIGHT TO DARK -->    </div>
    <div id="the_market_container"> <!-- LIGHT BACKGROUND --></div>
 </div>
like image 350
rs19 Avatar asked Oct 03 '15 23:10

rs19


People also ask

How do I change the font color in the background color?

With the difference blend mode we have to set the text element's color value to the opposite of the background. So if our background is rgb(0, 0, 0) we'll need to set the text pseudo element to rgb(255, 255, 255) . I think this little demo helps us recognise how useful the mix-blend-mode property can be.

How do I change the color of text in a picture in paint?

If you highlight the text and then select a colour from the colour palette, this will change the text colour.

How do I change the color of my text color?

Go to Format > Font > Font. + D to open the Font dialog box. Select the arrow next to Font color, and then choose a color. Select Default and then select Yes to apply the change to all new documents based on the template.


1 Answers

I like use this plugin http://aerolab.github.io/midnight.js/ you can try it

like image 95
sglazkov Avatar answered Oct 28 '22 02:10

sglazkov