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
Accent colors #187
Comments
|
The way we do this in GNOME Software is to take the icon, "bin" the colors using a color map and then chose the most "popular" colors. It seems to work well, and I believe it's what endless also does to get the app-tile background and text colors without adding tons of metadata to all the apps. |
|
@hughsie right, that is a way to work around the lack of a developer being able to pick a color. However we've found that in AppCenter apps we're able to get much richer and more interesting color combinations when developers have control over this field. We're happy to continue with using a extension to the spec, but I figured it was worth discussing for inclusion. For example, here I've picked a contrasting yellow for the accent color, which is much more interesting than what an algorithm would pick out as a "popular" color from the icon. I know one concern that was brought up before was how clients would present the color; I think it's important to reiterate that clients could use the color however they want (or not at all). In elementary AppCenter, we happen to use it for the header and in promotional banners. I could see a different client using it for an Install button. I could see another client weaving it into the whole app listing in interesting ways. But having a developer-specified color to be able to use enables clients to have a much more rich and interesting presentation. |
I'd argue that one or two developer-picked colors is not "tons" of metadata, and the value it adds for branding opportunity is worth it. |
Sorry, the tons was in relation to the number of projects that would need to be changed rather than the XML additions themselves. |
|
@huggsie, I’d imagine that GNOME software could continue using its algorithm as a fallback or ignoring this field altogether so that it wouldn’t be absolutely necessary for developers to add this metadata |
|
I do agree that in principle it makes sense for the developer to define a color to override whatever the software center would autodetect to get a nicer-looking experience. If the "I want to have developer set a primary color" feature is really ubiquitous and many software centers use it, I would have no reservations to adding it to the spec. If however it's more a thing specific to certain software-centers, then I think it would be better to keep it in the |
I do think components should be able to specify colors for accents and text, however I don't think it should be the application author that chooses them. ElementaryOS applications will want to use the Elementary palette, GNOME apps will want to use the Hicolor/Tango Palette, and KDE apps will want to use Oxygen/Breeze. Allowing applications to chose from all these different palettes means, put bluntly, that the software center will look generally crap. The accent colors are, like choosing which apps to feature, are something for a store "curator" to decide -- and whilst I think it's a good idea to express this in AppStream (perhaps with the software-center as a tag attribute or key prefix) I don't think we want to let app authors decide this. If we did, what would we do with this application: i.e. fully saturated red on a 100% black background. Or an app that puts: Where you can't actually read pink text on a red background. I'm also not sure how we'd make this high-contrast them-able for partially sighted users, without just ignoring the values altogether. I don't think you can make a software center that actually looks cohesive and not just a jumble of apps without some kind of manual curation. See https://src.fedoraproject.org/cgit/rpms/appstream-data.git/tree/fedora-categories.xml or https://src.fedoraproject.org/cgit/rpms/appstream-data.git/tree/steam-oars.xml for what we do in Fedora to add metadata to existing applications. |
|
I do think it's partially up to a distributor to screen appdata for quality at this point already; the exact arguments could be made for the name, icon, and screenshots of an app. Apps could set a terrible, unrecognizable icon, have an awful screenshot, and be named something incoherent. Choosing an accent color is not that much of a stretch there. Plus, apps intended for GNOME use GNOME-style icons and take screenshots with the default GNOME settings; apps intended for KDE use Oxygen-style icons and take screenshots in a KDE environment; apps intended for elementary OS use elementary-style icons and have screenshots from elementary OS. That is just the reality of having several different platforms that apps are targeting, and those are all things the authors of the app have the responsibility to consider. For the record, several apps for elementary OS don't actually use the elementary palette; most pick a complimentary color to their icon and app branding that would work well on any platform. In the case of the previous Firefox screenshot, that's the Firefox brand blue and it looks great in the app store along with other branded apps. |
Agreed, all good points.
But where do we draw the line? Do we let apps define the background image? The font color? I know a single static color isn't going to be enough for the GNOME designers; at the moment there's app-specific CSS (!) for the app banners to define things like the font, border, background, etc. |
|
I suppose I'm proposing to draw the line, to start, with one or two colors. We've also talked in the past about more rich branding opportunities like fonts and imagery, but decided that an icon, app name, summary, screenshots, and a couple of accent colors were a great start for developers while considering the constraints we wanted to impose. |
:) I assume those colors would be fully opaque, i.e. have no transparency? |
|
I think that's up for discussion. But I do think that makes sense, that way app stores could more easily use opacity and shades without worrying what's "underneath" those colors. In AppCenter I believe we use it as a CSS color, which means technically anything that's supported in CSS is supported in this field. But I think I would be okay restricting it to a single format without an alpha channel. |
|
GNOME Software uses colors for its banners as well now, which are defined as a custom appstream tag. The current syntax for that isn't great, and we'd like to have something nicer going forward. I wonder if it would make sense to standardize this across desktop environments? Some thoughts:
Relevant Software issue https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1445 |
|
Something I'm noticing for most if not all AppCenter apps: most use what would be considered a primary accent color as either the foreground or background, and then a contrasting neutral as the other. This might be over-complicating, but I'll spitball for completeness sake: it would probably serve AppCenter just as well for developers to only pick one color for their app, and then for them to choose if their branding should be "bold" or "subtle" or something similar. If "bold," we'd use their color as the background and use a mathematically contrasting foreground color (e.g. white or black, possibly subtly tinted with their color). If they chose "subtle," we could use their color as the foreground with a mathematically contrasting background. That would cover the cases above, and most that I'm seeing in AppCenter. (Calendar would be "subtle" with its green accent color, while Palette would be "bold" with its yellow accent color.) I have no idea if that's just over-complicating things, or actually really clever, though. And I guess it would give software stores more flexibility in what to do with those colors, which could be good (for diversity of implementations) or bad (for lack of clarity in the spec). |
Looking at the apps on the appcenter page it does seem like there's only a handful of apps that currently do this, so not sure it's worth the extra effort. That said, given that it's just a boolean and frontends are free to ignore it, I don't have a super strong opinion. My feeling is it would be good to keep this simple for app developers and have just two colors (light and dark), rather than four, or ideally just one (maybe we could darken the light color automatically if its lightness is above a certain level?). |
|
I'm not in favor of supporting "bold" and "subtle" selection in GNOME because the design of the software using it would become too inconsistent for my taste. I also tried custom bg and fg colors on apps.gnome.org and it just doesn't give me any beneficial results compared to black/white fg colors. Might be due to the GNOME color palette. But also most likely something that GNOME wouldn't use. But also, if others have a use case for it I'm fine with it as long it is okay to ignore the properties :) I'm mostly thinking of the accent color as part of the app's brand. That's why I'm a bit skeptical about having two different colors for light and dark. However, adjusting the color to get a good contrast could lead to undesired results that are out of control for app developers? Maybe I will do some real live experiments on GNOME apps for this. |
|
@sophie-h I'll also propose a branch against either the AppCenter client or AppCenter website that dynamically chooses a contrasting color as well so we can get a variety of apps and colors to see how it works. |
|
@cassidyjames Forgot to give an update. Darkening yellow shades like the one of Music gave very questionable results. That's why I currently think that we probably need two different colors for light/dark. |
|
Sorry for the delayed reply, this was an interesting read! <component type="desktop-application">
<id>org.example.StylishApp</id>
[...]
<presentation>
<color type="primary">#ff00ff</color>
<color type="secondary">#993d3d</color>
</presentation>
</component>I am not sure about the "primary"/"secondary" naming for the color, as that may be awkward if we ever add a third color. Adding a "foreground"/"fg" and "background"/"bg" color type is a lot more specific and will indicate to the app author how those colors will actually be used. But using the would mean that the specification has to require software centers to use these colors for foreground, background and possible text colors, so we would be adding design requirements to the AppStream spec (which I don't have a problem with, but which may not be universally considered a good idea). What do you think? |
|
@ximion I think a It's probably worth deciding what we do want to support here without getting overboard; something we enforce on the elementary side via review is a level of contrast between the two colors provided, but if all we want is an accent color to be used with <component type="desktop-application">
<id>org.example.StylishApp</id>
[...]
<presentation>
<color type="primary" prefers-color-scheme="light">#ff00ff</color>
<color type="primary" prefers-color-scheme="dark">#993d3d</color>
</presentation>
</component>…or maybe something less verbose, but in that vein. |
|
I'm happy with @cassidyjames' proposal :) We don't have use for a second color at the moment but, if someone else has it does not hurt if it exists. I think we should use the same property name for light/dark mode in #304. |
I think
Using exactly the same attributes clashes with how AppStream names things, but taking inspiration from there makes sense. <component type="desktop-application">
<id>org.example.StylishApp</id>
[...]
<branding>
<color type="primary" scheme_preference="light">#ff00ff</color>
<color type="primary" scheme_preference="dark">#993d3d</color>
</branding>
</component>This needs specification and implementation, maybe I can get to that this week or next week. |
|
This is specified & implemented now. Please review the changes, as I intend to make a release next Tuesday (and once this is out there, making changes again is very hard!). |
|
It looks to me like you added both I don't have a super strong opinion here since it's all optional, but my feeling is that it'd be better to start with just background, and maybe revisit the foreground question once we see how it works out in practice. As you said, changing/removing stuff later is hard :) |
|
Ah, I was under the impression that @cassidyjames needed a text color to realize a mockup like the one from the Pop!_Shop. |







Something we're using as an extension in elementary OS and Pop!_OS is a "primary" color, and a "primary text" color.
https://github.com/cassidyjames/dippi/blob/5b22f996648bf49890b850814da62b4b5ebc4f55/data/com.github.cassidyjames.dippi.appdata.xml.in#L240
This allows clients to have a developer-picked accent color to use how they want in their UI, such as for headers or button accents. "Primary text" is used as a contrasting color when needed, and is planned to be validated for a minimum contrast ratio on the build server.
We do this rather than automatically picking a color from the icon (as GNOME Software does and Flathub used to do), as oftentimes a developer will want to pick a nicely-contrasting color rather than the same color as in their icon.
The exact implementation could be discussed, but I feel like this could be broadly useful as a way to allow developers a little more detail that clients could then use to spruce up the presentation of apps.
The text was updated successfully, but these errors were encountered: