# New Script for perfect palette generation from RGB sprite

**URL:** <https://community.aseprite.org/t/new-script-for-perfect-palette-generation-from-rgb-sprite/9043>\
**Category:** Scripts & Extensions\
**Created:** [May 8, 2021, 7:40pm UTC](https://community.aseprite.org/t/new-script-for-perfect-palette-generation-from-rgb-sprite/9043 "2021-05-08T19:40:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dacap](https://community.aseprite.org/user_avatar/community.aseprite.org/dacap/32/10_2.png) [@dacap](https://community.aseprite.org/u/dacap)\
**Post date:** [May 9, 2021, 2:26pm UTC](https://community.aseprite.org/t/new-script-for-perfect-palette-generation-from-rgb-sprite/9043/5 "2021-05-09T14:26:23Z")

</div>

I tested and it looks like the colors are generated correctly in this case, but I understand that problems will appear when the image contains more than 256 colors (all colors are reduced to 5-bit RGB precision and 3-bit for alpha). [Some information about the fix coming in v1.3](https://community.aseprite.org/t/9-bit-or-more-palettes/8990/9). We’ll try to add a new “automatic heuristic” no choose the algorithm to generate the palette automatically (octree by default, the old 5-bit RGBA cube if alpha is needed).

---

_[View the full topic](https://community.aseprite.org/t/new-script-for-perfect-palette-generation-from-rgb-sprite/9043)._
