When we use function in 'colors' option then legend colors are not visible. Sandbox link: https://codesandbox.io/s/new-paper-ep1ei 