• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Icon Related Request

Status
Not open for further replies.

eejin

Tool Moderator
Level 12
Joined
Mar 6, 2017
Messages
234
So you probably will want take the area in the icon without the borders to start. You will probably want to work in the HSV colour space too. Something easy you could try would be to just use an image library to downscale the image to 1x1.
 

fladdermasken

Off-Topic Moderator
Level 39
Joined
Dec 27, 2006
Messages
3,690
anyone know of a good algorithm to determine primary colors out of an icon?
Depends how far down the rabbit hole you want to go I guess. I never dabbed much with this either, but you could maybe use some form of median cut algorithm, e.g. as done here Color Thief. If you want to go simpler, maybe try using a heavy blur filter to average out the pixel intensities instead of scaling it down.
 
Very cool idea! Here is my input.

upload_2021-1-10_13-27-4.png

upload_2021-1-9_16-23-57.png

upload_2021-1-9_23-4-53.png


upload_2021-1-9_23-5-51.png

upload_2021-1-9_16-29-48.png

I used the Median Cut (Bucket Sort) which @fladdermasken suggested. Wrote it in JS. Pastebin
 
Last edited:
Status
Not open for further replies.
Top