A downloadable Aseprite extension for Windows and macOS

Download NowName your own price

Current Release: v1.3.1 - MIT LICENSE 

©2024 John Riggles

This Aseprite extension allows you to use and save color palettes from Lospec. Simply enter the name of the Lospec palette you want to import.

Requirements

    This extension has been tested on both Windows and Mac OS (specifically, Windows 11 and Mac OS Sonoma 14.3.1). Linux is not officially supported, but everything except the "Open In App..." feature should work.

It is intended to run on Aseprite version 1.3 or later and requires API version 1.3-rc5 or newer. As long as you have the latest stable version of Aseprite, you should be fine!

Permissions

    When you run this extension for the first time, you'll be asked to grant some permissions. This extension uses curl under the hood to get data from Lospec and will need your permission to execute that command. Additionally, this extension will need your permission to write files if you intend to save any imported palettes.

When prompted, select the "Give full trust to this script" checkbox and then click "Give Script Full Access" (you'll only need to do this once)

Features & Usage

    Once you've imported the palette you want, you can...

  • Save it as a preset and use it immediately
  • Use it without saving
  • Save it as a preset for use later (doesn't override the current Aseprite palette)

    Palettes are saved in GIMP palette format (*.gpl) by default since this option allows for other info from Lospec to be included with the palette, such as the author's name and the Lospec palette list URL

Palettes can also be saved in *.aseprite format, but this option won't include any of the extra data from Lospec

    To use this plugin, just open the "Options" menu above the color palette and then select "Import Palette from Lospec"

You can also click on the "Open In App..." link from any palette's page on Lospec

https://lospec.com/palette-list/nostalgos-12

Any link to a valid palette name using the URI scheme lospec-palette:// will automatically launch Aseprite and bring up the Palette Importer - you can try the link to one of my palettes here:

 lospec-palette://nostalgos-12



Latest Changes

  • You can now click on the "Open In App..." button on Lospec and it will automatically bring up the Palette Preview dialog in Aseprite
    • The first time you open a lospec-palette://URI you'll probably see an alert from your browser something like this one:

    • Because of how Mac OS deals with URI handlers, Lospec Palette Importer relies on a small helper app (bundled with the extension) which you may need to grant automation permissions/access - just follow the on-screen prompts when your Mac asks (you can find the relevant toggle in "System Settings/Privacy & Security/Automation" under "Lospec Palette Importer")
    • On Windows, you may need to run the extension from within Aseprite once before the "Open In App..." links work because the extension needs to set an environment variable first
    • CAVEATS:
      • Clicking "Open In App..." will open a new instance of Aseprite every time; this seems like a limitation of the Aseprite CLI, but I'm looking for a workaround
      • "Open In App..." is not supported on Linux -  AFAICT, setting up custom URI handlers can vary subtly from distro to distro, and unfortunately there's no way for me to test them all :( thanks for understanding!
    • Also: some users expressed concern, so rest assured that you can still enter a name manually!
    • If "Open In App..." isn't working after you update the extension, try rebooting. The lospec-palette://URI handler needs to be registered with your OS, and a reboot usually takes care of that
  • You can now click on "Get Daily Palette" on the import window to get the Lospec daily palette
  • You can now click on "Get Random Palette" on the import window to get a random Lospec palette - go get inspired!
Thanks to Lospec Discord user @PureAsbestos for the idea / feature request

Patch 1.3.1 fixes an issue on Windows where the extension could sometimes fail to find Aseprite.exe, which it needs in order for the URI handler to work

Thanks to Lospec Discord user @Fabico for the inspiration behind this fix




     If you find this extension useful, please consider donating to support further development! ♥

You can track development changes here:

https://github.com/JRiggles/Lospec-Palette-Importer

Updated 19 days ago
StatusReleased
CategoryTool
PlatformsWindows, macOS
Rating
Rated 4.7 out of 5 stars
(6 total ratings)
Authorsudo_whoami
Made withAseprite
TagsAseprite, lospec, palette, Pixel Art, plugin
Code licenseMIT License
Average sessionA few seconds
LanguagesEnglish
LinksSource code

Download

Download NowName your own price

Click download now to get access to the following files:

Lospec Palette Importer - v1.3.1 143 kB

Development log

Comments

Log in with itch.io to leave a comment.

I keep getting messages saying "An error occurs when registering the lospec.com URL handler" and “lua:122:curlerror -  could not close connection” when trying to get a palette. Is there anything I can do to fix it?

I use window 10 and version 1.3.11 of aseprite

(2 edits)

Hey there! I’ll look into it! curl is the command used to make the URL request to Lospec’s API, so it’s possible something changed on their end. I’ll make sure it’s still working on my Mac, too.

Okay, I’ve tested the extension on both Windows 11 and Mac OS Sequoia using the latest stable version of Aseprite, which at the moment is 1.3.10.1. It’s possible that since v1.3.11 is still in beta (not sure if you’re on -beta1 or -beta2) that not all of the API features have been implemented/are working correctly. For the time being I’d recommend rolling back to the stable version of Aseprite.

Thank you! I will try again with an older version

Awesome work! Thanks!

(+1)

Thank you for your support!

(+1)

Please tell me this works for libresprite

I’m afraid the short answer is no, or at the very least “I doubt it”.

The longer answer is: I don’t know what parts of Libresprite’s API are compatible with Aseprite’s API, if any. This extension also relies on Aseprite’s CLI to handle Lospec’s “Open In App” links, so that feature would almost certainly not work in Libresprite.

Never mind, I just got Aseprite lol. Getting the extension now

Thanks for your support!

No problem, it's very useful and I've already used it quite a few times even though I just downloaded it today. And the ability to just get random or daily palettes as well is going to be very helpful for me and I can see myself using it very often

(+1)

I was getting the error

Error: /home/$USER/.config/aseprite/extensions/losepec-palette-importer/./lospec-palette-importer.lua:191: unexpected end of input

on the Steam version on Linux (Manjaro). I launched the programme from the command line directly from /home/$USER/.local/share/Steam/steamapps/common/Aseprite so I could see logs and potentially debug it a little more but when launching it this way instead of through Steam the script ran fine.

Might be helpful as a workaround to anyone who needs it or the developer for figuring out what the problem is.

Thanks for the report. Based on the information from you and @PhoenixTamer, it seems like there’s something up with a file path somewhere when using the Steam version of Aseprite. This should give me a place to start looking.

That said, I don’t currently have a Linux machine (virtual or otherwise) set up for testing, so I can’t 100% guarantee Linux support with this extension, but I’ll do my best!

Hey again,

I just got another reply from user @PhoenixTamer who’s been running into the same issue on Windows and they found out that Avast was preventing the script from executing properly (likely because it relys on curl under the hood, but that’s a guess). I’m not sure if that’s what you’re up against, but it’s possible that your AV is being overzealous.

I was going to try and debug it a bit more today but today it has decided to work fine when launched through Steam too, so I have no idea what was happening.

Weird, but okay! Keep me posted if you run into anything else, and feel free to submit an issue to the GitHub repo if you hit any other snags. Thanks for keeping me in the loop.

question, how can i change the directory where the palettes should be saved? i have aseprite in drive D:

There’s a button for that on the Palette Preview window. Set the path you want and the extension will remember it.

(+1)

thank

Funciona no windows 10, e no aseprite 1.3.5?

The extension is developed on Aseprite 1.3.5 and is working on Mac OS Sonoma and Windows 11. I don’t have a Windows 10 machine to test on, but if you’re seeing an error message please post it here.

(2 edits)

Hey, I'm running into an error and don't really know why. Just installed and did everything as the page says. This happens after I click ok on the initial import window that pops up.

(1 edit)

Hey PhoenixTamer! Can you give me some more info when you get a second?

  • What version of Windows are you using?
  • What version of Aseprite are you using?
  • What’s the name of the palette you tried to import?
  • Does it only happen with that name, or is it every time?

That’ll help me narrow down the issue. Thanks for the report!

Hi sudo, yeah I can

  • Windows 11 Pro 23H2
  • Aseprite v1.3.5
  • Loop Hero was the first I tried
  • With every name I tried I get the same issue

I can take a screen cap of the order of things if needed also?

Thank you, that helps! If it’s every name you try then I can assume it’s not just one palette with a weird JSON issue. I just hav a couple more questions if you don’t mind.

  • Are you using the Steam version of Aseprite or the standalone version?
  • Have you tried removing and reinstalling the extension? If you do, I’d recommend a fresh download just in case something got corrupted last time!

I'm using the steam version.

Fresh install results in the same issue even with fresh download as of writing.

Thanks for looking into this!

This seems like a path-related issue with the Steam version of Aseprite. Mind if I ask where your Aseprite executable is located? @Merrow’s Cowl is running into the same issue on Linux, so this is helping me narrow it down further.

(1 edit) (+1)

Im running into an error, i dont know if the extension is fully supported for Linux but it drops this error:

Hmm…it could be that the extension is running into an issue writing to /tmp, which it needs to do in order to collect the output from curl. I’ll try to get a Linux test done this week to see if I can figure out what’s going on. Sorry you’re running into trouble!

(+1)

Thanks for the quick response mate! If it helps I am using Ubuntu 22.04 LTS and PopOs, good luck with the tests!

(+1)

Epic

Thanks! Much appreciated

(+1)

Thumbs up