• 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 Section - Color Code

Status
Not open for further replies.
Hey,

given that from an aesthetics approach it's always better if you have an ability set of similar colors, I was thinking if we could implement a search filter in the Icon Section, which will automatically scan icons of mutual tinting.

For example, if type Spells/Abilities is selected and you pick color green, it will bring up all icons tagged under the category of Abilities that are majorly consisted of green tones.

The thing is, in the current system, we have to guess potential keywords to sort out a smooth icon set and if the artist has not included the 'appropriate' keywords, it becomes harder to do a match-up, by greatly reducing our chances.

160036-albums4747-picture83694.png

Default colors can be:
  • Red
  • Green
  • Blue
  • Yellow
  • Purple
  • Orange
  • Brown
  • White
  • Black
  • Grey
  • Pink
 

Ralle

Owner
Level 79
Joined
Oct 6, 2004
Messages
10,183
Holy shit that sounds cool.

...I have been thinking a little about it.

My first thought. Reduce the image to 1x1 pixel and get the average color in that way, but this won't work. If the image is 50% red and 50% blue, the average color will be purple.

Second thought. Group the pixels into color ranges, we can have intervals for each color (red, blue, green, yellow, purple ....). Then count which group has the most and that will be the dominant color of the image. We could also store the percentage of each interval in the database and permit lookups on 20% red along with 50% green and so on.

We could also get the average color of the image in HSL, but I am not too familiar with that.
 
Last edited:
Google has implemented this system, but their allocation is advanced. Apparently, among gaussian distributions, they also use edge detection and other methods.
The thing is, their goal is to concentrate a region of interest on the image, but imagine that all of the images that will come up as results are of different dimensions.
In our case, it should be much simpler, given that there is a fixed resolution of 64 x 64.

I am not really certain of how advanced this is, but I guess topics like these were covered in your curriculum; this paper is giving an algorithm and delineates the idea behind the process. I guess you could use it for some inspiration, in case you're indeed interested.
 
That is a great idea.

Second thought. Group the pixels into color ranges, we can have intervals for each color (red, blue, green, yellow, purple ....). Then count which group has the most and that will be the dominant color of the image. We could also store the percentage of each interval in the database and permit lookups on 20% red along with 50% green and so on.

^That would probably be best.
 
Level 30
Joined
Jul 31, 2010
Messages
5,259
Thumbs up for this, uh can we also add another option called 'Others?'.

I mean not all icons has a one strong standing color on a icon, if an icon has a mixture of red, blue, and black or made out of rainbow colors then a 'Others' option must be given.
 
Thumbs up for this, uh can we also add another option called 'Others?'.

I mean not all icons has a one strong standing color on a icon, if an icon has a mixture of red, blue, and black or made out of rainbow colors then a 'Others' option must be given.

Speaking in artistic terms, having colors distributed evenly is rare, if not impossible (exception would be the Yin Yang symbol!). I really think that you have to put some effort in generating a precise colored-pixels distribution, if it's not a concept (namely, the Yin Yang symbol I mentioned). After all, the flexibility of this system, in case it finds more than one dominant colors, should allow it to display the icon(s) as a result in either dominant color schemes. Therefore, if it's both red and white, the icon should be a result of both schemes.
 

Ralle

Owner
Level 79
Joined
Oct 6, 2004
Messages
10,183
After debating this problem with I3lackDeath, I came up with the following to show:
attachment.php


It takes each color tone r, g, b and divides it by a factor and rounds it to the nearest value and then multiplies it by the factor again. This gives us a color resolution of about (256/factor)^3. The pixels are counted into each group and shown as percentages.

I have been tweaking the factor a lot, in case of the screenshot it is 96 which gives us about 19 colors.
 

Attachments

  • Screenshot 2014-05-07 08.30.43.png
    Screenshot 2014-05-07 08.30.43.png
    78.2 KB · Views: 159
After debating this problem with I3lackDeath, I came up with the following to show:
attachment.php


It takes each color tone r, g, b and divides it by a factor and rounds it to the nearest value and then multiplies it by the factor again. This gives us a color resolution of about (256/factor)^3. The pixels are counted into each group and shown as percentages.

I have been tweaking the factor a lot, in case of the screenshot it is 96 which gives us about 19 colors.

Very cool.
However, the similar tones must be merged, in order to result a more realistic percentage; that is, tone vs color. The resulting percent should represent a basic color and not a tone - that's how you control the search filter as well.

For example, in the last one, black takes 30%, but to our, human standards, we wouldn't consider this icon as majorly black, we would consider it green. So, if those tones are mixed, the actual and overall green is 45,81% (putting saturated tones aside - those would represent Grey color scheme).
 

Ralle

Owner
Level 79
Joined
Oct 6, 2004
Messages
10,183
Very cool.
However, the similar tones must be merged, in order to result a more realistic percentage; that is, tone vs color. The resulting percent should represent a basic color and not a tone - that's how you control the search filter as well.

For example, in the last one, black takes 30%, but to our, human standards, we wouldn't consider this icon as majorly black, we would consider it green. So, if those tones are mixed, the actual and overall green is 45,81% (putting saturated tones aside - those would represent Grey color scheme).
Right, but I was planning on keeping more data, not merging it all. This would allow to search for the skin tone in Azothan's image as well. When searching, you would be able to select percentage, but also the distance away from the selected color you want.
 
Right, but I was planning on keeping more data, not merging it all. This would allow to search for the skin tone in Azothan's image as well. When searching, you would be able to select percentage, but also the distance away from the selected color you want.

Oh okay, I was actually going for the simple way. In that case, why don't you have a color picking tool? The "distance" can then be defined in hue and saturation terms.

160036-albums4747-picture83756.png

Additionally, users could add custom colors in the mix (the one I highlighted) and save their preferences in the database as .xml.
 

Deleted member 219079

D

Deleted member 219079

Where's your mod status? :(

Anyway +1, this would be nice to see ^^
 
Status
Not open for further replies.
Top