Skip to content

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

@reddraconi

Description

@reddraconi

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

Metadata

Metadata

Assignees

Labels

Type: EnhancementNew feature or requestType: UI/UXUser interface and/or user experience

Projects

Status

🚧 In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions