Artwork Guidelines

From FreeCAD Documentation
Jump to: navigation, search
Other languages:
Deutsch • ‎English • ‎français • ‎italiano

Note: for sample icons, see the artwork collection page.

Guidelines

Introduction

A FreeCAD icon is composed of 6 elements which can be remembered easily using the awkward acronym "SALCHO": Stroke, Alignment, Lighting, Color, Highlighting, Outline

Here's a concrete, yet arbitrary example:

An icon that's taken all its vitamins
A The highlight color is used for this entire surface to indicate light falling from above
B The obligatory dark outline surrounds the icon shape to provide form contrast
C Just inside the outline, the highlight stroke (using the highlight color) provides contrast on dark backgrounds
D This face is primarily the base color, but a light gradient from highlight (top left) to base (bottom right) gives the impression of light falling from above left
E The highlight here is the base color (one tone down) to give the impression of this being the face furthest from the light
F This face is like D but goes from Base (top left) to Dark (bottom right), to indicate that this is the face furthest from the light

The following sections explain these elements in a more structured way.

Colors

[Obligatory] FreeCAD uses a palette adapted from the Tango palette. Each main color comes in 4 tones: Highlight, Base, Dark and Outline.

Example of a 4 tone color family (Chameleon)
A selection of some key colors. (See the palette for the full range)
Use the Yellow tones for tools that create objects.
Use the Blue tones for tools that modify objects
Use the Teal tones for view-related tools
Use the Red tones for Constraint related tools

Why limit myself to these colors?

Restricting the colors to a defined palette helps avoid heterogeneous iconography and improves readability when there are many icons.
How? Installing the palette is as easy as copying it into your Inkscape palette folder.

Grid & Stroke Width

[Obligatory] FreeCAD Icons are 64px*64px nominal size (Though I like to leave a 2px margin all around to prevent funky antialiasing things from happening on the image edge). When creating or editing an icon, make sure your document size is 64 x 64 with the units being px. This gives you 60px * 60px of useable space.

Stay inside the blue area and everything will work out just fine

It's also strongly recommended to apply at least one grid to the document that has a grid line every pixel and a major grid line every 2 pixels. Feel free to add other grids to help out, but you should have at least that one. You're strokes would then be aligned along the minor grid intersections. (See image)

Strokes should be no thinner than 2px, with rounded caps and corners in most cases. Strokes can be thicker, but aim for a multiple of two to minimise scaling fuzziness.

Orderly grid, all strokes 2px, perfection achieved

Why use this grid and stroke size?

For historical reasons, FreeCAD uses a 64px icon that then gets scaled down. Not ideal, but it adds character. As a result, keeping things aligned to a power of two grid with thicknesses that are powers of two helps to avoid or at least mitigate anti-aliasing issues upon rescaling.
How? Go to "File > Document Properties" and confirm the width, height and units of your page are correct. Then go to the "Grids" tab and click "New", setting the units to "px", "Spacing X" and "Spacing Y" to 1 and "Major grid line every" to 2

Outline

[Obligatory] Basing yourself on the main color of the icon, ensure that there is a dark outline (of 2px as mentioned earlier). This works in union with the highlight to ensure good form contrast on multiple background tones.

Wow, much clear, so contrast

Why is the outline needed?

The outline is the skeleton on which everything else hangs by adding form contrast. Using the Outline color or the Dark color depends on the situation, but without this line, the range of backgrounds on which the icon is visible gets drastically limited
How? Simply add an external stroke of 2px around every part of the icon that will be adjacent to the background color. In the case of a donut shape for example, you would also do the interior hole. Snap your path's nodes to the grid whenever possible, aiming for the minor grid intersections.

Highlight

[Strongly Advised] Using the Highlight color, add an internal stroke (again, 2px) to help make that outline pop. On dark backgrounds, it's this highlight that will be providing the form to the icon.

That highlight will save our socks on a dark background.

Why use the highlight?

The highlight works in unison with the outline to improve form contrast - especially on dark backgrounds. It is never a bad idea, but if you don't have the space (on a thin line for example) you can opt out of it provided you have ensured enough contrast between the main color and the outline
How? Just like the outline, simply trace a stroke of 2px around the internal side of the outline, snapping nodes to the grid when possible, aiming for the minor grid intersections.

Lighting

[Optional] As per Tango guidelines, if you're adding a gradient lighting effect, try to make it look like the light is coming from the top left. This is done by adding the highlight color up top left and the Base or Dark color bottom right (notice that I haven't played around trying to use a non-palette color)

Subtle but effective.

Why use lighting?

Lighting is just another way to tie icons together and ensure that there are varying levels of 'value' to improve their readability. Provided the outline and highlight are present though, it can be considered optional
How? Set the fill to be a linear or a radial gradient. (Available in the stroke and fill settings). Remember that using "F2" to set direct select, you can move the nodes of the gradient around to make sure they are at the right angle.

Closing Remarks

That's it - that's all there is to making sure that there's a unified look to all the icons. Remember: SALCHO Stroke, Alignment, Lighting, Color, Highlight, Outline

Here's a collection of tips to be able to check your work:

Checking Size

Inkscape has a super handy tool to check your icon at various sizes. Go to "View > Icon Preview..." and it'll show you previews of your icon resized to 16,24,32 and 64px!

Checking Your Outline

1. Put your icon on a big rectangle that is the same color as the darkest color in your icon.

2. Still looks OK? Great! Go to step 3. If not, see the frowny face

3. Do the same but this time using the lightest color.

4. Still looks OK? Great! Outlines and highlights have been used appropriately!

My icon is barely visible!

You have poor form contrast. Double check the outline and highlight, one of these is probably missing or improperly applied.

Checking Your Contrast

1. Get your icon and export it to either .png or .jpg, whichever you prefer

2. Open an image program and change it to grayscale. In GIMP for example you would go to "Image > Mode > Grayscale" (This is excellent for testing for color blind users)

3. Can you still clearly make out any internal details? Great! You have good contrast!

I can't make out all the wonderful detail!

The colors you've chosen have poor value contrast. Try using colors that are further apart in your 4 tone palette. i.e. A Highlight green beside a highlight yellow will be difficult to see, knock one of those colors down to Base or Dark.