-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Client API: read/write tag presentation details #360
Comments
I opened a duplicate feature request by accident. I'll put in my ideas in a comment here since this issue came first. I hope you don't mind me piggy-backing off your idea you had first. ContextIn Motivation (Why?)Querying the tag namespace colors set in the client allows for third party applications using the API to have a more consistent look and feel. If the user recolors the What it might look likeIn response to a GET request, the client API might return an object. Each key corresponds to a namespace, and each value corresponds to a color. There might also have to be some "magic" for unnamespaced tags. Hypothetical response: {
"none": "#0000FF",
"character": "#00FF00",
"creator": "#FF0000",
"meta": "and so on......"
} |
As a workaround for the time being, I compiled the default colors. You can use this as a stand-in resource until this feature is added.
|
I had actually already done that for Hydrus Web. If anyone finds it useful here is the SCSS: // Original tag colors from Hydrus source code
$tag-colors: (
system: rgb(153, 101, 21),
meta: rgb(0, 0, 0),
creator: rgb(170, 0, 0),
studio: rgb(128, 0, 0),
character: rgb(0, 170, 0),
person: rgb(0, 128, 0),
series: rgb(170, 0, 170),
default-namespace: rgb(114, 160, 193),
no-namespace: rgb(0, 111, 250)
); https://github.com/floogulinc/hydrus-web/blob/master/src/_variables.scss#L18-L29 |
If tag colours became part of the Qt stylesheets as suggested in #371 it would then be possible to just parse the .qss for the details as an option. |
After some discussion in the server, I think this is the best way to go about sending the data to the user (using made up data as an example): "tag_presentation":
{
"default": [0,0,255],
"namespaces":
{
"": [128, 128, 128],
"creator": [0, 255, 0],
"character": [255, 0, 0 ]
}
} where ...
If a namespace isn't present in the |
#1460 adds the ability to get tag namespace colors along with almost everything else in the client options. |
If nothing else, getting the color definitions would be useful for CSS.
The text was updated successfully, but these errors were encountered: