import Color from '../color/index.mjs';
import mix from './mix.mjs';

/* IMPORT */
/* 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 { invert as default };
