# How to add color from .PAL (color palette) files

**URL:** <https://discourse.mapeditor.org/t/how-to-add-color-from-pal-color-palette-files/5258>\
**Category:** Questions\
**Created:** [September 4, 2021, 1:42pm UTC](https://discourse.mapeditor.org/t/how-to-add-color-from-pal-color-palette-files/5258 "2021-09-04T13:42:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pokefan6498](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/pokefan6498/32/3461_2.png) [@Pokefan6498](https://discourse.mapeditor.org/u/Pokefan6498)\
**Post date:** [September 4, 2021, 1:42pm UTC](https://discourse.mapeditor.org/t/how-to-add-color-from-pal-color-palette-files/5258/1 "2021-09-04T13:42:46Z")

</div>

i had found disassemby of Pokemon gold and silver SW97 demo but idk how to add color from .PAL (color palette) files

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [September 7, 2021, 9:29am UTC](https://discourse.mapeditor.org/t/how-to-add-color-from-pal-color-palette-files/5258/2 "2021-09-07T09:29:48Z")

</div>

Hey @Pokefan6498, welcome to the Tiled forum! I’ve moved your question to its own topic, so that we don’t revive a 5 year old topic that seems only slightly related.

What does this data look like? In general, there is the option to implement custom map loaders in [JavaScript](https://www.mapeditor.org/docs/scripting/index.html), which can also load custom image formats. A custom loader could read in the relevant .PAL file and use the [Image API](https://www.mapeditor.org/docs/scripting/classes/image.html), which supports palettes through “setColor” and “setColorTable”. The created image can then passed to the [loadFromImage](https://www.mapeditor.org/docs/scripting/classes/tileset.html#loadfromimage) function of a Tileset.
