🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

AutoTextColor is a jQuery plugin for automatic text coloring that automatically inverts the color of the text depending on the background of its parent container.

background

Documentation

AutoTextColor

A lightweight jQuery plugin that sets an element's text to either black or white automatically, depending on the background color to give the best contrast. If an element does not have a background, the parent element's background is used and so on until a background is found.

Demo / Examples

AutoTextColor Demo / Examples

Usage

<div class="card" style="background: #fe626d;">   <h2>Lorem Ipsum</h2>   <p>Sed dapibus nunc ac blandit porta.</p> </div>
$(document).ready(function(){   $('div.card').autotextcolor(); });

You May Also Like