I have an android app that uses android.support.v7.graphics.Palette to get the color info from a dynamic image and then customize the layout of the activity to use mutated colors from the image. My question is, does Angular 5 have anything similiar? I want to model the web version of this project as closely to the android version as possible. This would mean dynamically setting a few style colors after an image is selected.
Update: I have been looking at ColorThief() for javascript. But I am not sure how to access it from an Angular 5 component.
Thank you PK
For anyone looking for something like this I ended up using node-vibrant.js. I ran npm install then added the file to my scripts array in the angular.json file
Then I changed my tsconfig.json file to the following:
I then imported Vibrant and Palette into my angular 6.0.0 component
Then it was pretty easy to call in ngOnInit() with just an url to an image
And call it from the html file:
The hardest part was getting the proper import statement.
would not work as the documentation says it will.
Hope this saves someone some time.
PK