mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
config redirect
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
/* 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;
|
||||
Reference in New Issue
Block a user