Skip to content
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

feat: Support custom user colors in tags #372

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

seakrueger
Copy link
Contributor

@seakrueger seakrueger commented Aug 23, 2024

Hex-based colors

In order to support custom colors, tags must be moved away from the fixed name color system and are instead transitioned to a single primary hex value. All other accents are now up to the front-end to generate (if they are necessary). This allows for the removal of the large tag color dictionary, though the key and primary color hex remain for legacy purporses. A check is added to library loading to replace old fixed-named colors with their primary hex key.

Custom colors

QT provides an os-native color picker dialog complete with a full color spectrum, default colors, saving of colors, and an eye-dropper utility. The old color dropdown has been replaced with a push button that opens the color dialog modal and updates to reflect the selected color. The QColor class is also used for generating accent colors as it provides simple helper functions to create off-set colors.

Example gif
closes #264

Converts the tag color system to be based around a hex value rather than
a named color system. This allows users to use any color they want for a
tag, implemented via QColorDialog. Accent colors are then created at
runtime for borders and text, etc.
When loading a library that contains the old named colors, the program
will now automatically convert those to the hex value matching the old
primary key. This will persist the new hex value when saved.
The predefined pallete colors are no longer necessary and were not being
used anywhere, allowing them to be simply removed.
@seakrueger
Copy link
Contributor Author

Marked as draft until #332 is merged, and I can update the stuff around it

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience TagStudio: Tags Relating to the TagStudio tag system labels Aug 23, 2024
@CyanVoxel
Copy link
Member

We discussed it in the Discord already, but I'll repost my take on this here to keep everything in one place:

[...] I've intended custom tag colors to still have a name associated with them, so they would be proper objects with an id, name, and hex_value with them, then the id gets referenced by the tag. This allows you to update a color value and have that reflected on all of the tags that already use that color, instead of having to go in and manually change each one individually. It also would enable you to search by your named colors among and opens up the door for better color organization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Changes Requested Changes are quested to this TagStudio: Tags Relating to the TagStudio tag system Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Hex/RGB Color Values for Tags
2 participants