---
title: "Discussion on \"Generate 16 unique avatar faces from 40 lines of easy code\" | Hashnode"
description: "Discussion on \"Generate 16 unique avatar faces from 40 lines of easy code\". my-avatars\n\nIn v1.0.0 I've added the ability to change the color of images. The updates are specified at the bottom of this post. Link.\n\n\nNB. Thanks to Lucas for this comment. The math is now correct 🥳\nIf anything is wrong, please do not hesitate to..."
url: "https://hashnode.com/posts/generate-16-unique-avatar-faces-from-40-lines-of-easy-code/616cb574441bd36daa9575e2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Generate 16 unique avatar faces from 40 lines of easy code](https://blog.madco.me/generate-16-unique-avatar-faces-from-40-lines-of-easy-code?utm_source=hashnode&utm_medium=feed)

my-avatars In v1.0.0 I've added the ability to change the color of images. The updates are specified at the bottom of this post. Link. NB. Thanks to Lucas for this comment. The math is now correct 🥳 If anything is wrong, please do not hesitate to...

Oct 17, 2021 · 6 min read · blog.madco.me  
Read the article

-   [#vanilla-js-1](https://hashnode.com/tag/vanilla-js-1)
-   [#js](https://hashnode.com/tag/js)
-   [#generators](https://hashnode.com/tag/generators)
-   [#creativity](https://hashnode.com/tag/creativity)

## Written by

[Mads B. Cordes](https://hashnode.com/@madco)

@madco · Held hostage by the Danish gov

  
[View profile](https://hashnode.com/@madco)

A fond believer in learning by doing 🧑‍💻

A fond believer in learning by doing. Loves to try out new languages in the world of computing Want to optimize your JS-code(s)? Welp, I've got you covered! https://hasty.dev 🧑‍💻 Want to tweet your commits? https://gitbird.dev 🐦 It's dead I think, honestly, I haven't been keeping up with the death of the blue-bird-site 🤐

## Responses 1

Markdown supported · ⌘↵ to post

[Lucas Simon](https://hashnode.com/@DemiPixel)

[Oct 18, 2021](https://hashnode.com/posts/generate-16-unique-avatar-faces-from-40-lines-of-easy-code/616cb574441bd36daa9575e2/comment/616cf9b6441bd36daa9578f1)

You're selling yourself short—2 combinations of each would be `2 * 2 * 2 * 2` or 16 combinations! If you had 3 of each, that would be `3 * 3 * 3 * 3`, or 81 combinations—an increase to 500%, not 150%!

[Mads B. Cordes](https://hashnode.com/@madco)

[Oct 18, 2021](https://hashnode.com/posts/generate-16-unique-avatar-faces-from-40-lines-of-easy-code/616cb574441bd36daa9575e2/comment/616cf9b6441bd36daa9578f1#reply-616cfbc2f1f4c944cc6b2c3b)

Ah, had a nagging about this. Thank you!

I didn't know what to google, to check for the proper equation. So, thank you for letting me know 🥳
