Skip to content
On this page

Iconography

On this page

Our mobile apps use GitHub's icon system, Octicons. Octicons come in two sizes, 16px and 24px.

Star the Octicons repo to follow along with the Octicons project. Open issues and pull requests to get support or ask for new icon additions to the system.

Icon colors

In the Mobile Design Toolkit we have two functional icon colors: iconPrimary and iconSecondary. Each of these colors implements a different brightness of gray, adding visual prominence to more important or actionable icons. But when should you use either of these colors? And when should an icon be gray versus our blue link color?

In general, an icon should be blue if it is:

  • Used in a navigation bar or toolbar. In other words, it is part of the app chrome.
  • It is a primary, highly-desirable action for a user to take on any given screen.

We strive to use as few link tinted elements in a content view in order to draw attention to only the most important actionable interface elements. Adding too many blue buttons and icons dilutes the power of the color as a way to draw attention.

ExampleNotes
repo profile exampleOn the repo profile, we follow our rules that nav bar iconography is link blue, because it's part of the app's chrome. The icons in the Star and Watch buttons are also blue to match the button labels and draw attention to the highly-desirable actions that we want users to take on this screen.
triage sheet exampleIn the triage sheet, the primary purpose of this sheet is to manage assignees for a given issue. Because the purpose of this view is to manage (or more likely, to add) assignees, we make the ( + ) icons blue.

Gray icons

Generally, an icon could be filling one of four roles:

  • An icon that represents and important actionable activity, but is not the primary purpose of the view
  • An icon that represents an unimportant actionable activity
  • An icon that is not actionable and serves as a primary supporting graphic of a piece of text or a view
  • An icon that is not actionable and only serves as a decorative accessory

Generally, important actionable elements and primary supporting graphics should use iconPrimary, while unimportant actionable elements and decorative accessories use iconSecondary.

Let's look at some examples:

ExampleNotes
user profile exampleThe header metatdata icons are unimportant decorative accessories, and not actionable, so we tint them secondary. The Pinned section icon is not actionable, but is an important accessory to distinguish this content section, so it is tinted primary.
settings exampleThe accessory icons are not actionable, and not important decorations, so they are tinted secondary.
repo profile exampleThe branch icon in the code browsing section header is an unactionable accessory tinted secondary.
commit details exampleThe commit icon is an important accessory, despite not being actionable, so it is tinted primary.
search typeahead exampleThe search typeahead icons are important supporting accessories to quickly distinguish the typeahead options, so they are tinted primary.
edit favorites exampleThe remove buttons when editing favorites are actionable, but not the primary action on this view, so they are tinted secondary.

Other icon colors

It's possible for icons to be other colors besides gray and blue! For example, we use yellow star icons to indicate that you, the viewer, have starred a repository. We also use green eye icons to indicate that you are watching a repository. You might also find pink hearts when working with sponsors. And of course, we use green, red, and purple as issue and pull request icon tints to represent states (open, closed, merged).

ExampleNotes
starred repo exampleIn this example, the Star button gets a gray label and yellow icon to communicate the state of the viewer's relationship to this repository. The gray label de-emphasizes the button, because un-starring is a generally undesirable action.
commit details exampleThe state of the PR where this commit was created is tinted purple to indicate the PR was merged, therefore this commit was merged, too.
Edit this page on GitHub
2 contributorsashygeebrianlovin
Last edited by ashygee on October 22, 2020