Skip to content
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

Include primary color(s) #1

Open
KevinPayravi opened this issue Aug 24, 2020 · 3 comments
Open

Include primary color(s) #1

KevinPayravi opened this issue Aug 24, 2020 · 3 comments
Labels
enhancement New feature to existing endpoints, such as new filters or fields

Comments

@KevinPayravi
Copy link
Member

Users have requested colors for critters and villagers (and any future items), primarily to decorate Discord embeds with. There are a couple solutions here:

  • Use a library to determine the predominate color of the item's image, and return it.
  • Utilize the in-game colors attached to each item (e.g. critters and villagers in New Horizons each have two hidden colors associated with them, which come into play for gifting).
@KevinPayravi
Copy link
Member Author

Use a library to determine the predominate color of the item's image, and return it.

Pro: Returned color will be the most accurate in terms of matching the image.

Cons: Not technically "Animal Crossing" data so may be out of scope; can be costly to calculate color averages, especially for users requesting items at once e.g. all villagers. May end up needing to store the calculated values somewhere, like a database.

@KevinPayravi
Copy link
Member Author

Utilize the in-game colors attached to each item (e.g. critters and villagers in New Horizons each have two hidden colors associated with them, which come into play for gifting).

Pro: Data is already on the wiki, just needs to be stored in Cargo and then returned.

Cons: There are two colors, so Discord embeds will need to select one (the first one is usually the most true-to-image, but not 100% of the time; for example, the first color for the man-faced stink bug is black, not yellow as one might expect). This will work for New Horizons assets, but not necessarily assets from previous games.

@KevinPayravi KevinPayravi added the enhancement New feature to existing endpoints, such as new filters or fields label Aug 24, 2020
@Micalobia
Copy link
Contributor

Micalobia commented Oct 1, 2020

I think utilizing the in-game colors is the way to go for this one, as averaging the images would be outside the scope of the API, IMO. Plus, from personal experience, averaging the color of an image for something like that can end up with gross looking colors that aren't as appealing, if the image happens to have a lot of variation in its color.

As for older games, I think the best solutions are

  • Leaving both fields blank
  • Storing the averages (in a database) into the second color (to signify that it isn't a color from the game itself) and leaving the primary color blank

KevinPayravi pushed a commit that referenced this issue May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature to existing endpoints, such as new filters or fields
Projects
None yet
Development

No branches or pull requests

2 participants