
Reshader is a lightweight and customizable color palette generator that provides a function to extract the shades of a color you specify.
How to use it:
Download & Install:
# Yarn $ yarn add reshader # NPM $ npm install reshader --save
Or directly download and insert the ‘reshader.js’ into the html file.
<script src="dist/reshader.js"></script>
Pass the color code as the first parameter to the ‘reshader’ function and done. Color formats supported:
- Hex
- RGB
- HSL
reshader('#16A085')
reshader('rgb(22,160,133) ')
reshader('hsl(168, 75.8%, 35.7%)')Default configuration options.
reshader('#16A085', {
numberOfVariations: 5,
contrastRatio: 0.1,
outputModel: 'hex',
shouldIgnoreRepeated: false,
shouldIgnoreWhites: false,
shouldIgnoreBlacks: false
})






