-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work as a util server side. #2
Comments
You could use node-colour-extractor for this, get the top two colours that are used and store those for values for a gradient. |
@nijikokun Thanks for the link to |
I'm totally on board with this, just trying to think how I could adapt Grade to work on the server, without adding too much bloat to the client-side library.... Maybe a sub-project? Happy to hear suggestions... |
I actually want to use this in an Electron app, so I don't need node support since the DOM is available. But I want to interact with this as a pure function rather than via the DOM. I want to pass in an image as a Buffer (i.e. Uint8Array) and get back the colors. Then I can set them in the DOM however I like. That might be a good start. Once this new API exists, then you can just support a |
Awesome tool!
It would be very useful if Grade could work with node as well.
Example usecase:
For some applications it could be too expensive to calculate the gradients on the client.
The text was updated successfully, but these errors were encountered: