Style Guide for Vectorized Icons

See tutorial video here.

  • Vector icons should be drawn in Adobe Illustrator, or alternatively Inkscape or another free tool. In Illustrator, each icon should be one named artboard, sized to the correct size in pixels. Currently drawn SVG icons, and templates for future ones, are in the Illustrator file nbbuild/IconScripts/nb_vector_icons.ai in the NetBeans Repo.
    (Adobe Illustrator comes with a free 7-day trial, after which it's $35/month. If cost is a problem but you want to contribute your time to draw icons, ask Eirik...)
  • If you prefer to use Inkscape instead, and want to contribute icons, that's fine; just make sure to follow the same consistent style as the other icons. If using Inkscape, perhaps pick another group of icons than the ones that are currently being drawn in Illustrator. It's best to draw all similar-looking icons in the same tool.
  • For each icon to be vectorized, place the old bitmap version of the icon in a separate layer ("Old Bitmap Icons" in the Illustrator template). You can then draw the vectorized version on top.
  • Since most of the existing NetBeans icons follow a quite consistent visual style, and to simplify the job of creating new icons, it is best to keep the shape of the new vectorized icons the same as in the old bitmap icons. For instance, a rectangle of size 5x4px in the bitmap icon should probably become a rectangle of 5x4px in the vector version.
  • Keep the same general colors in vectorized icons as in the corresponding old bitmap icons.
  • Some of the old bitmap icons use grays with a slightly blue tint (e.g. the file icons). This style is out of fashion (resembling 1990s Solaris GUIs etc.); use neutral greys instead.
  • If the old bitmap icon is complex, it is fine to simplify it a bit when drawing vectorized versions.
  • Omit gradients, bevels, and unnecessary drop shadows. They take more time to draw, and with "flat design", they are now out of fashion in any case.
  • Use a stroke width of 1px around the main shapes in the icon, like in the existing bitmap icons. The new icons should look consistent with the existing bitmap icons, especially since we may see bitmap icons and vector icons side-by-side for a long time. Within shapes, 0.5px strokes can be used for finer details. (0.5px strokes become 1 device pixel on Retina screens, which have a 2x scaling.)
  • The 1px strokes that outline the icon's shapes should typically be 33% transparent black on top of the shape's background color, or of similar darkness. See existing converted SVG icons (in the "SVG" column) as an example.
  • When the same shape occurs in different icons but at different sizes (e.g. the small magnifying glass in find_selection.png vs. the large magnifying glass in zoom_in.png), strokes and borders should still remain at the same thickness (1px for external borders and 0.5px for internal strokes).
  • Horizontal and vertical strokes must be aligned to the pixel grid.
  • While it may sometimes be necessary to "outline" strokes for the purposes of applying boolean operations (e.g. subtracting another shape from the stroke only), strokes should be left as strokes whenever possible, as this leads to smaller SVG files, and makes shapes within the icon easier to modify.
  • For icons in the main IDE toolbar (as opposed to the editor toolbar), which exist in both 16x16 and 24x24 sizes, base the vector version on the smaller 16x16 one, which is sometimes simpler. (This is already done in the prioritized icon list above.)
  • Avoid unnecessary anchor points.

With some practice, it takes on average 30 minutes to create an SVG version of a typical icon in Adobe Illustrator.

Process for Exporting SVG Files from Adobe Illustrator

See icon-scripts/README.txt in the netbeans-tools repository for more information.

  • No labels