node-vibrant minimum colors

node-vibrant minimum colors

I am using node-vibrant for extracting colors from an image. The problem is that (for images with more than 4 color) it extracts not always these 4 colors. This is my code:

I am using node-vibrant for extracting colors from an image. The problem is that (for images with more than 4 color) it extracts not always these 4 colors. This is my code:

            Vibrant.from(img.src)
            .quality(1)
            .clearFilters()
            .getPalette()
            .then((palette) => {console.log(palette)...

Example result:

{Vibrant: e, LightVibrant: e, DarkVibrant: e, Muted: null, LightMuted: null, …} where for the example Muted and LightMuted are null.

I have tried and this repo Vibrant.js which is deprecated and they are saying to use node-vibrant. With older Vibrant.js for the same image, I am getting 4 colors:

Vibrant #ea4138 (index):26 DarkVibrant #aa1c1e (index):26 DarkMuted #040404 (index):26 LightVibrant #eb494d

Is there a way to get minimum colors with node-vibrant ?

I am using React.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top 7 Most Popular Node.js Frameworks You Should Know

Node.js is an open-source, cross-platform, runtime environment that allows developers to run JavaScript outside of a browser. In this post, you'll see top 7 of the most popular Node frameworks at this point in time (ranked from high to low by GitHub stars).

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.