Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/srjn45/sp-auto-color

react component that assigns the text color as per the background color to the child components
https://github.com/srjn45/sp-auto-color

Last synced: 21 days ago
JSON representation

react component that assigns the text color as per the background color to the child components

Awesome Lists containing this project

README

        

# sp-auto-color

auto-color is a wrapper component that manages the text color on the basis of background color.

selects white font color for dark backgrounds and black for light on the basis of threshold.

default threshold value is 128

it supports hex, rgb & rgba coloring formats

## Installation & Usage

install the package

```
$ npm i --save sp-auto-color

```

```
import AutoColor from 'sp-auto-color';

...

render () {
return (
...


...your code here

...
)
}
```