If your setup doesn't support ESM (import/export) yet, you'll have to include the dependency with
const bestContrast = require('get-best-contrast-color').default
Note the necessary .default.
Can it be fixed? If not, adding a line to the readme would be helpful.