Skip to content

[Feature Request]: Add import/export options for Tag Colors #862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
reddraconi opened this issue Mar 14, 2025 · 1 comment
Open
3 tasks done

[Feature Request]: Add import/export options for Tag Colors #862

reddraconi opened this issue Mar 14, 2025 · 1 comment
Assignees
Labels
Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience
Milestone

Comments

@reddraconi
Copy link

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

Description

It would be handy to have a way to import and export a plaintext file containing a color scheme, rather than use the GUI to create one. This would let us do things like create and import a list of HTML colors or other standardized colors (e.g., FreeTone, etc.)

Solution

Importing a scheme

  1. User navigates to Edit > Manage Tag Colors
  2. A new button should placed near New Namespace (perhaps Import Namespace?)
  3. A file picker should pop up, allowing the user to pick a theme file
  4. The theme file should be validated for correctness and handled appropriately if the user did a silly thing
  5. If everything's good, it should be added to the list of tag color namespaces in the Manage Tag Colors window.

Note: I'm not sure of the best way to tell a user their theme is bad. Maybe just import whatever we can, then
complain about the rest, or just give them a clue as to where the problem is and refuse the whole file?

Exporting a scheme

  1. User navigates to Edit > Manage Tag Colors
  2. A new button should placed near New Namespace (perhaps Export Namespace?)
  3. The user clicks an existing namespace group and clicks Export Namespace
  4. A file picker should pop up, allowing the user to save the theme file

Theme file format?

Something simple that can be hand-jammed or built by Python or the like.
TOML or JSON come to mind immediately.

Example Theme (TOML)

There's probably a better way to lay this out. :)

`
[colortheme]
namespace = "Solarized Dark"

color1_name = "Base03_Yellow"
color1_primary = "hex:#002b36"
color1_secondary = "hsv:45,255,181"
color1_secondary_for_border = False ; Default

color2_name = "Base03_Orange"
color2_primary = "rgb:0,43,54"
color2_secondary = "hex:#cb4b16"
color3_secondary_for_border = True
`

Alternatives

No response

@reddraconi reddraconi added the Type: Enhancement New feature or request label Mar 14, 2025
@CyanVoxel CyanVoxel added the Type: UI/UX User interface and/or user experience label Mar 14, 2025
@CyanVoxel CyanVoxel moved this to 🚧 In progress in TagStudio Development Mar 14, 2025
@CyanVoxel CyanVoxel self-assigned this Mar 14, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.6 milestone Mar 14, 2025
@CyanVoxel
Copy link
Member

Already planned and in progress for 9.6, or possibly even a 9.5.x patch 👍

I've been workshopping a TOML-based format for a few weeks now, though I still need to make some tweaks to the schema now that the custom color feature is finalized. If you're curious, it looks something like this:

pack_format = 1
version = 1.0
author = "CyanVoxel"
title = "CGA Tag Colors"
description = "A collection of 16 + 1 CGA tag colors!"

[[namespaces]]
namespace = "cyanvoxel.cga"
name = "CGA Palette"

[[colors]]
namespace = "cyanvoxel.cga"
slug = "black"
name = "Black"
primary = "#000000"

[[colors]]
namespace = "cyanvoxel.cga"
slug = "blue"
name = "Blue"
primary = "#0000AA"

...

This is also an approach I plan on using for sharing tags themselves in the future, so the color sharing system will act as sort of a test run for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request Type: UI/UX User interface and/or user experience
Projects
Status: 🚧 In progress
Development

No branches or pull requests

2 participants