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

Write some documentation about use of colours #10753

Open
chris48s opened this issue Dec 20, 2024 · 2 comments
Open

Write some documentation about use of colours #10753

chris48s opened this issue Dec 20, 2024 · 2 comments
Labels
documentation Developer and end-user documentation

Comments

@chris48s
Copy link
Member

📋 Description

We've had a couple of PRs recently where contributors have wanted to contribute badges using branded colours in preference to the standard palette.

We have some pretty good docs we can point to when it comes to thing like conventions for badge URLs but I'd like to have some guidance written down about use of colours.

I need to have a think about exactly what to write, but the key point is basically: We use colour to convey information and ensure consistency, not to promote a project or brand. There may also be a few places where we need to pull some older services into line with this as part of writing the guidance.

This is related to shields values of being semantic and non-promotional

@chris48s chris48s added the documentation Developer and end-user documentation label Dec 20, 2024
@chris48s
Copy link
Member Author

chris48s commented Dec 23, 2024

OK. So I've had a bit of a think about this.

First off, I think there are several services where we're violating this principle that colour should be semantic and not promotional. These are:

  • Docker
  • Thunderstore
  • Cocoapods
  • Pulsar
  • Vaadin Directory
  • Gerrit

and as part of this we should get our house in shape and fix them.

I think the key points I want to hit in the docs are:

  • Colour should be used semantically. We use colours to communicate information about the message displayed on the badge, not to promote a project or brand.
  • If your badge fits into a standard category (e.g: build status, version, number of downloads, coverage %), use an existing helper function (which already encode some decisions about colour scheme)
  • Use named colours rather than hex values
  • Label should always use the default #555555

Then I think there are some kind of base guidelines to start from. Maybe:

  • Nominal value: blue
  • Ordinal continuous value (bigger number is "better" or smaller number is "better"): use floorCount()
  • Ordinal discrete value: use a colorScale()

I also think we probably want to frame this second section as a set of starting assumptions rather than hard rules. I'm sure there are places where we've deviated from that for good reasons, but I think there is value in documenting "given no other information, start here".

@jNullj
Copy link
Member

jNullj commented Dec 27, 2024

We already refer to it in the spec:

- **non-promotional**: badges should refrain from advertising a service but instead provide value through the badge's information instead

I noticed we have an exception for social badges like X (twitter), GitHub stars etc...
We might want to refer to these as well or take a decision about them.

We could change the developer-experience by making the use of helper functions mandatory by default so using a unique render starts a discussion. On the other hand this is a bit extreme and will result in many exceptions in code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Developer and end-user documentation
Projects
None yet
Development

No branches or pull requests

2 participants