ColorPane, a suite of color tools for Studio [v0.5.0]

Can you please add a HUE change for the entire gradient as an option? Much appreciated.

thank you so much im gonna use this for my plugin, crazy how easy it is to use

is there any way to make it so my plugin can install color pane for the user so they don’t have to install it themselves?

With the current version (0.4), the user has to install the plugin themself. I have been working on a new version which will allow you to use ColorPane without requiring the user to install the plugin (unless they want extra features), and it’s mostly done, but I don’t have a release date yet.

1 Like

Oh yes, an update is here.

Hello everyone, v0.5 has been released. This version has mostly been an effort to make it easier for plugin developers to use ColorPane in their own plugins.

Please let me know if you encounter any bugs. I’ve tried my best to test everything, but with the amount of stuff that’s changed, I wouldn’t be surprised if there were still bugs.

For plugin developers

Instead of having to do some weird script searching like in previous versions, I’ve put the color tools of ColorPane into their own library. To use it, you just put the script in your project and require it like any other module. In hindsight, the old way of integrating ColorPane didn’t make a whole lot of sense, and that was reflected in several of the plugins I saw that tried to integrate it. You were not, in fact, supposed to insert the whole plugin into your own plugin.

:warning: Unsurprisingly, if you’ve integrated a previous version of ColorPane, that method’s not going to work anymore. You’ll need to use the library to keep using the color tools. The process is much easier, and outlined in the documentation.

:warning: One thing end-users of ColorPane in your plugin may notice is limited functionality. Unless the end-user has the Companion plugin installed (see next section), palette editing (creation, editing, deletion, etc.) and settings changes are disabled. Palettes and settings are stored in the Companion plugin, and acts as the settings bridge between the various ColorPane instances. These instances otherwise have no way to share this information.

For everyone else

The current ColorPane plugin is being enhanced and renamed to the ColorPane Companion. These changes should be transparent to you, but are important for a seamless user experience in any other plugins integrating ColorPane.

Additionally, you should notice better multi-session (when you have multiple Studio windows open) behaviour. Settings and palette changes should now propagate between all sessions. To avoid synchronisation issues, you should only change settings from one session at a time.

Changelog

Most of the big changes are on the developer side, but here are some highlighted user-facing changes:

  • Partial translations for French, Korean, and Russian
  • Removed the Copic color palette
  • Creating colors/gradients/palettes with the same name will now name them “New Thing (1/2/3/4/etc.)” instead of “New Thing (1) (1) (1) (1) …”
  • If you have invalid palette information, only the invalid information will be removed, as opposed to literally all of your palettes (oops)
  • Changing color properties now uses the Recording API, which should result in more reliable undo/redo
Full changelog

Added

  • Added partial translations for French (fr), Korean (ko), and Russian (ru)
  • Color editor: Added a dedicated “Set Color” button for colors in the palette list layout
  • Color editor: Added a random color button
  • Gradient editor: Added a “Reset” button for gradient precision
  • Companion: Added settings importing and exporting
  • API: Added API.IsColorPromptAvailable to check if calling API.PromptForColor will succeed or immediately reject (replaces API.IsColorEditorOpen)
  • API: Added API.IsGradientPromptAvailable to check if calling API.PromptForGradient will succeed or immediately reject (replaces API.IsGradientEditorOpen)

Changed

  • Script injection is no longer a required plugin permission
  • Settings: Invalid palettes will no longer cause the entire list of palettes to be removed, just the invalid palettes
  • Color editor: Duplicating palettes with the same name will now create or increment a counter instead of naming it “Palette (1) (1) (1) …”
  • Color Properties: Changing color properties now uses the Recording API
  • API: Promises from the API no longer cancel if the user closes the prompt, they will now instead reject with PromptError.PromptCancelled
  • API: For GradientPromptOptions, the type of InitialGradient and the value of GradientType are no longer required to match
  • API: For ColorPromptOptions, the type of InitialColor and the value of ColorType are no longer required to match
  • API: The API.PromptError enum has been re-named to API.PromptRejection
  • API: The API.PromptForColor Promise now rejects with SameAsInitial instead of PromptCancelled if the initial and new colors are the same
  • API: The API.PromptForGradient Promise now rejects with SameAsInitial instead of PromptCancelled if the initial and new gradients are the same
  • API: The color tools of ColorPane have been spun off into their own library, and the old method of using ColorPane will no longer work. Please read the Integration page of the documentation for details on the updated integration method.

Fixed

  • API: API.PromptForColorSequence (deprecated) now returns a Promise as expected
  • API: Promises returned by API.PromptForColor will no longer reject when the initial and new colors are the same even though you didn’t specify an initial color
  • API: Promises returned by API.PromptForGradient will no longer reject when the initial and new gradients are the same even though you didn’t specify an initial gradient

Deprecated

  • API: API.IsColorEditorOpen is now deprecated, please use API.IsColorPromptAvailable for new work
  • API: API.IsGradientEditorOpen is now deprecated, please use API.IsGradientPromptAvailable for new work
  • API: API.PromptError is now deprecated, please use API.PromptRejection for new work
  • API: API.Unloading is now deprecated, you should use your plugin’s Unloading event instead
  • API: API.GetVersion is now deprecated

Removed

  • Removed the first-time use plugin permissions warning
  • Automatic update-checking has been removed
  • Color editor: Removed the Copic color palette

What’s Next

The UI code will need an overhaul since it uses legacy Roact, which has been deprecated in favour of React Lua. Much of the code in general needs to be refactored for type safety and modern styling conventions.

There are also several quality-of-life changes I want to add to ColorPane, including:

  • Make UIs resize-friendly (minimum sizes on plugin widgets are no longer enforced)
  • Make UIs translation-friendly (a lot of the text box sizes in the current UI are fixed-size and may not accommodate translated text)
  • A history system that lets you un/re-do color updates
  • An overhauled gradient palette experience
  • and others!

I’m anticipating that the next version will be v1.0, which also means that all the deprecated API members will be removed. If you happen to be using these members, I’ve included some replacements (which may not be 1-to-1, please review the documentation):

  • API.Unloading → Use your plugin’s Unloading event
  • API.PromptError → API.PromptRejection
  • API.PromptForColorSequence → API.PromptForGradient
  • API.IsColorEditorOpen → API.IsColorPromptAvailable
  • API.IsGradientEditorOpen → API.IsGradientPromptAvailable
  • API.IsColorSequenceEditorOpen → API.IsGradientPromptAvailable
  • API.GetVersion → None

Seeing the timeline of this update, I don’t want to make any promises as to when the next version will come out. It may be a few months, a few years, or soon™.

Regardless, thank you for using ColorPane. :cookie: