<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      id="icon-design">

  <info>
    <credit type="author">
      <name>Allan Day</name>
      <email>aday@gnome.org</email>
    </credit>
    <credit type="author">
      <name>Jakub Steiner</name>
    </credit>
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
    <desc>Selecting and creating icons.</desc>
  </info>

<title>Creating icons</title>

<p>This page provides guidelines for those creating their own icons, including both full-color icons (typically used for application icons) and symbolic icons (typically used for user interface controls). For a more general overview of icon styles and usage, including the stock icons that are available, see <link xref="icons-and-artwork">icons and artwork</link>.</p>

<section id="full-color-icons">
<title>Full-color icons</title>

<media type="image" mime="image/png" src="figures/icons/shading.svg"/>

<p>The full-color icon style is most commonly used for application icons. The nominal size of full-color icons is 128×128px. However, because application icons are sometimes presented at lower resolutions, they should only feature detail that is presentable at 64×64px resolution: anything more detailed would get lost by filtering/scaling down.</p>

<p>The <link href="https://gitlab.gnome.org/Community/Design/HIG-app-icons/blob/master/template.svg">full-color icon template</link> includes a 2px grid which should help you avoid adding detail that's finer than the desired threshold.</p>

<media type="image" mime="image/png" src="figures/icons/sizes.svg"/>

<section id="perspective">
<title>Perspective &amp; shape</title>

<p>Full-color icons should be rendered with a simple orthogonal view and no real or isometric perspective. To provide depth a raised effect can be applied to mimic the Z-axis. Please keep the effect subtle though! Raising the object more than 2 detail units (4 nominal pixels) is not recommended.</p>

<p>In order to aid recognition, each application icon should have a unique silhouette. However, to ensure visual balance with other application icons, the aspect ratio should not be extreme. Very narrow or very wide shapes should be avoided.</p>

<media type="image" mime="image/png" src="figures/icons/aspect-ratio.svg"/>

<p>A <link href="https://gitlab.gnome.org/Community/Design/HIG-app-icons/raw/master/template.svg">grid template</link> is available to assist with placing your icon outline. Do not try to cover a maximum area of the canvas: the outside margin should be left empty. In some circumstances a small detail can be extended into this margin space.</p>

<media type="image" mime="image/png" src="figures/icons/whitespace.svg"/>

</section>

<section id="shadows">
<title>Shadows</title>

<p>Shadows can be drawn internally, within a full-color icon, with the light source pointing straight from above. However, shadows should not be drawn outside the main silhouette of the icon, as these are generated programmatically based on the context. When app icons are presented on a white background, for example, a strong drop shadow is rendered to help define the contours.</p>

<media type="image" mime="image/png" src="figures/icons/dropshadow.png"/>

<p>Versions of application icons can also be programmatically generated for development or nightly builds.</p>
</section>

<section id="palette">
<title>Palette</title>

<p>Below is the baseline GNOME app icon color palette.</p>

<!-- will chop up into named sections once the colors stabilize -->


<table>
<tr>
<td><p>Blue</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/blue.png"/></td>
</tr>
<tr>
<td><p>Green</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/green.png"/></td>
</tr>
<tr>
<td><p>Yellow</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/yellow.png"/></td>
</tr>
<tr>
<td><p>Orange</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/orange.png"/></td>
</tr>
<tr>
<td><p>Red</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/red.png"/></td>
</tr>
<tr>
<td><p>Purple</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/purple.png"/></td>
</tr>
<tr>
<td><p>Brown</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/brown.png"/></td>
</tr>
<tr>
<td><p>Neutral</p></td>
<td><media type="image" mime="image/svg" src="figures/icons/palette/neutral.png"/></td>
</tr>
</table>


<p>You are free to use different shades of these colors depending on the desired material effect. However, these primary colors are a good baseline to start from. A GIMP/Inkscape format palette <link href="https://gitlab.gnome.org/Teams/Design/HIG-app-icons/raw/master/GNOME%20HIG.gpl?inline=false">is available</link>.</p>

<p>It is recommended to keep flat surfaces unshaded, but using gradients to signify bent surfaces is allowed.</p>

</section>
</section>


<section id="custom-symbolic-icons">
<title>Symbolic icons</title>

<p>Symbolic icons have a simple form and are drawn within a 16×16 pixel grid. They are then programmatically scaled and colored within the user interface itself.</p>

<list>
<item><p>Identify a single property when looking for an appropriate metaphor for an icon, and focus on what distinguishes the idea you want to communicate. For example, when describing an action to be performed on an image, it isn’t necessary to repeat the idea of an image in every icon. Instead, focus on what is distinct about each action (for example: rotate, tag, align).</p></item>
<item><p>Avoid using any perspective in symbolic icons, stick to a simple orthogonal view.</p></item>
<item><p>When using unfilled strokes for an outline, try avoiding hairline (1px) and do at least a 2px stroke for the main feature of the icon. </p></item>
<item><p>Symbolic icons are recolored at runtime to match the context, very much like a piece of text. While there are ways to “shade” parts of an icon by using opacity or creating duotone/pattern dithering, try avoiding these as much as possible.</p></item>
<item><p>When a metaphor relies on the negative space, make sure it will work with the colors inverted. For example a camera lens spec/highlight will only work if lighter than the lens itself.</p></item>
</list>

<media type="image" mime="image/svg" src="figures/icons/inverting.svg"/>

<section id="size-and-grid">
<title>Size and grid</title>

<p>While symbolic icons are scalable and should work at any size, the basic canvas size is 16×16 grid units. You have the whole canvas to fill, but note that a filled rectangular object will appear stronger/larger when placed next to items that only use thinner strokes. Try to keep the contrast of your whole set.</p>

</section>

</section>


<!-- graphic assets TODO
<section id="stock-icons">
<title>GNOME Icon Pack</title>

<p>To avoid starting from scratch, we prepared a selection of commonly used icons you can include in your application, or create derivatives of. The set is licensed CC0, so they can be used regardless of your project's license.</p>

</section>
-->

</page>
