Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/srjn45/sp-auto-color
- Owner: srjn45
- License: mit
- Created: 2018-10-17T09:17:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T09:24:30.000Z (over 6 years ago)
- Last Synced: 2024-12-10T17:52:02.298Z (about 2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
...
)
}
```