you need to do the following instructions on how to use the api from imagga.com
-
go to your dashboard and click on the COPY icon and paste the contents into a temporary notepad
-
create these blocks for your program (see link below for remixing). paste the authorization string at the value pointed by the arrow.
this example is for calling the endpoint for /colors -GET https://api.imagga.com/v2/colors
the image being analyzed is
https://imagga.com/static/images/tagging/wind-farm-538576_640.jpg
( the query parameter overall_count is optional). the desired property is the color_variance
this is the json segment
here’s the output
- below is an example of obtaining the html code corresponding to the second image color
here is the json segment
and here’s the output
here is the full json (minified)
{“result”:{“colors”:{“background_colors”:[{“b”:44,“closest_palette_color”:“light bronze”,“closest_palette_color_html_code”:“#8c5e37”,“closest_palette_color_parent”:“skin”,“closest_palette_distance”:4.52967214584351,“g”:82,“html_code”:“#7e522c”,“percent”:51.0419311523438,“r”:126},{“b”:145,“closest_palette_color”:“cerulean”,“closest_palette_color_html_code”:“#0074a8”,“closest_palette_color_parent”:“blue”,“closest_palette_distance”:7.5955286026001,“g”:120,“html_code”:“#527891”,“percent”:48.7481651306152,“r”:82}],“color_percent_threshold”:1.75,“color_variance”:37,“foreground_colors”:[{“b”:37,“closest_palette_color”:“brownie”,“closest_palette_color_html_code”:“#584039”,“closest_palette_color_parent”:“brown”,“closest_palette_distance”:6.22881174087524,“g”:50,“html_code”:“#473225”,“percent”:53.2818565368652,“r”:71},{“b”:163,“closest_palette_color”:“sand”,“closest_palette_color_html_code”:“#c1b7b0”,“closest_palette_color_parent”:“light grey”,“closest_palette_distance”:4.85505628585815,“g”:179,“html_code”:“#c7b3a3”,“percent”:36.0360336303711,“r”:199},{“b”:192,“closest_palette_color”:“electric blue”,“closest_palette_color_html_code”:“#363b7c”,“closest_palette_color_parent”:“blue”,“closest_palette_distance”:14.8790979385376,“g”:0,“html_code”:“#0000c0”,“percent”:10.682110786438,“r”:0}],“image_colors”:[{“b”:44,“closest_palette_color”:“medium brown”,“closest_palette_color_html_code”:“#7c5a2c”,“closest_palette_color_parent”:“skin”,“closest_palette_distance”:4.31696796417236,“g”:83,“html_code”:“#7d532c”,“percent”:51.4569625854492,“r”:125},{“b”:145,“closest_palette_color”:“cerulean”,“closest_palette_color_html_code”:“#0074a8”,“closest_palette_color_parent”:“blue”,“closest_palette_distance”:7.94029760360718,“g”:121,“html_code”:“#537991”,“percent”:48.3985824584961,“r”:83}],“object_percentage”:1.51922690868378}},“status”:{“text”:“”,“type”:“success”}}
finally here is the project for remixing -copy screen ‘imagga’
https://x.thunkable.com/copy/0e431237483efaff64938496f6d310b0