- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
14 lines
351 B
JavaScript
14 lines
351 B
JavaScript
/* IMPORT */
|
|
import Color from '../color/index.js';
|
|
import mix from './mix.js';
|
|
/* MAIN */
|
|
const invert = (color, weight = 100) => {
|
|
const inverse = Color.parse(color);
|
|
inverse.r = 255 - inverse.r;
|
|
inverse.g = 255 - inverse.g;
|
|
inverse.b = 255 - inverse.b;
|
|
return mix(inverse, color, weight);
|
|
};
|
|
/* EXPORT */
|
|
export default invert;
|