A downloadable Aseprite script

Color2GMS is a Lua script for Aseprite that allows you to convert your sprite's colors and palette to Game Maker-compatible hexadecimal values in #rrggbb, $bbggrr and 0xbbggrr formats, as the following data types:

  • Plain text list
  • Game Maker (Studio 2) style #macro
  • Game Maker (Studio 2) style array[]
  • Game Maker (Studio 2) style Struct = {}
  • Game Maker (Studio 2 and earlier) style ds_list()
  • Game Maker (Studio 2 and earlier) style ds_map()

It also shows you the hex values of the currently selected brush foreground and background colors.

StatusReleased
CategoryTool
Rating
Rated 5.0 out of 5 stars
(2 total ratings)
Authorkid marscat
TagsAseprite, extension, GameMaker, lua, lua-script, mod, script, tool

Download

Download
color2gms_0_3.zip 3.8 kB

Install instructions

What It Does:

  • Color2GMS shows your currently selected foreground and background colors in #rrggbb, by default.
  • You can export the current sprite's entire palette as a .txt file, listing all colors in the selected data type.
  • You must have a sprite selected for the script to work.

Setup:

  • In Aseprite, go to File > Scripts > Open Scripts Folder. This should open an Explorer window at <Aseprite program folder>/scripts.
  • Copy the file Color2GMS.lua to this folder and in File > Scripts select Rescan Scripts Folder.
  • The script should now be available for use.

Instructions:

  • While editing a Sprite, select File > Scripts > Color2GMS and this will open a new dialog.
  • Choose the Color Format (RGB or BGR) and Hex Prefix (#, $ or 0x) to decide how to format the color values.
  • By default, it will show the color values of the current brush foreground and background color. You can also select arbitrary colors on the two available color pickers. This will not update your currently selected colors.
  • You can copy the hex values directly from the text boxes below the color pickers.
  • Finally, you can select a file in which to export your palette, and then press any button to export the palette to the specified data type.
  • Note: when prompted, you should select the option "Allow Write Access", otherwise the script will fail and not export anything to the file.

In case of a bug, or any other kind of unintentional behavior, feel free to contact me at kidmarscat [at] gmail [dot] com or leave a comment on the Color2GMS download page, kidmarscat.itch.io/color2gms

ChangeLog

Date Version What changed
2024-09 0.3 Total rewrite, allows multiple color formats and data type exports.
2022-12 0.2 Internal release, expanded with some new but buggy features.
2020-05 0.1 First Release, extremely basic.

Comments

Log in with itch.io to leave a comment.

Pog