Artwork Guidelines/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Caption|Siatka z obrysami będącymi wielokrotnością 2px.}}")
(Created page with "{| class="wikitable" style="width:70%;" |- |style="width:25%;"|Dlaczego używana jest ta siatka i rozmiar obrysu? |Ze względów historycznych FreeCAD używa ikony 64x64, która jest następnie skalowana w dół. Nie jest to idealne rozwiązanie, ale dodaje charakteru. W rezultacie utrzymywanie rzeczy wyrównanych do siatki potęgi dwójki i grubości będących potęgami dwójki pomaga uniknąć lub przynajmniej złagodzić problemy z antyaliasingiem podczas ponownego s...")
Line 111: Line 111:
{| class="wikitable" style="width:70%;"
{| class="wikitable" style="width:70%;"
|-
|-
|style="width:25%;"|Why use this grid and stroke size?
|style="width:25%;"|Dlaczego używana jest ta siatka i rozmiar obrysu?
|Ze względów historycznych FreeCAD używa ikony 64x64, która jest następnie skalowana w dół. Nie jest to idealne rozwiązanie, ale dodaje charakteru. W rezultacie utrzymywanie rzeczy wyrównanych do siatki potęgi dwójki i grubości będących potęgami dwójki pomaga uniknąć lub przynajmniej złagodzić problemy z antyaliasingiem podczas ponownego skalowania.
|For historical reasons, FreeCAD uses a 64x64 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 re-scaling.
|-
|-
|Jak mogę się do tego zastosować?
|How do I comply with this?
|If you are using Inkscape, go to {{MenuCommand|File → Document Properties}} and confirm the width, height and units of your page are correct. Then go to the {{MenuCommand|Grids}} tab, click {{Button|New}}, set the units to {{incode|px}}, {{incode|Spacing X}} and {{incode|Spacing Y}} to 1 and {{incode|Major grid line every}} to 2.
|Jeśli używasz Inkscape, przejdź do {{MenuCommand|File → Document Properties}} i potwierdź, że szerokość, wysokość i jednostki strony prawidłowe. Następnie przejdź do zakładki {{MenuCommand|Grids}}, kliknij {{Button|New}}, ustaw jednostki na {{incode|px}}, {{incode|Spacing X}} i {{incode|Spacing Y}} na 1 oraz {{incode|Major grid line every}} na 2.
|}
|}



Revision as of 16:46, 20 October 2023

Wprowadzenie

Uwaga: wszystkie ikony w drzewie źródłowym, zobacz na stronie grafika.

Ikona FreeCAD składa się z 6 elementów, które można zapamiętać za pomocą akronimu SALCHO: Stroke, Alignment, Lighlighting, Color, Highlighting, Outline.

Oto konkretny, aczkolwiek dowolny przykład:

A Kolor podświetlenia jest używany na całej powierzchni, aby wskazać światło padające z góry.
B Obowiązkowy ciemny kontur otacza kształt ikony, aby zapewnić kontrast kształtu.
C Obrys wewnątrz konturu (kolor podświetlenia) zapewnia kontrast na ciemnym tle.
D Ta powierzchnia ma głównie kolor bazowy, ale jasny gradient od podświetlenia (u góry po lewej) do bazy (u dołu po prawej) sprawia wrażenie światła padającego z góry po lewej.
E Podświetleniem jest tutaj kolor bazowy (o jeden ton niższy), aby sprawić wrażenie, że jest to twarz najbardziej oddalona od światła.
F Ta powierzchnia jest podobna do D, ale przechodzi od podstawy (lewy górny róg) do ciemności (prawy dolny róg), aby wskazać, że jest to powierzchnia najbardziej oddalona od światła.

Poniższe sekcje wyjaśniają te elementy bardziej szczegółowo.

Ikona ta jest wyświetlana w następujący sposób:

64 px, oryginalny rozmiar, duże przyciski.
32 px, średni rozmiar, zwykłe przyciski.
16 px, mały rozmiar, tak jak pojawia się w widoku drzewa.

Kolory

Obowiązkowe

FreeCAD używa palety zaadaptowanej z palety Tango. Każdy główny kolor ma 4 odcienie: Podświetlenia, Bazy, Ciemnego i Konturu. Zauważ, że Kontur nie jest całkowicie czarny, ale jest bardzo ciemną odmianą Bazy.

Przykład 4-tonowej rodziny kolorów (Kameleon).

Zobacz paletę FreeCAD, aby zapoznać się z pełną gamą. Wybór niektórych kluczowych kolorów.

Żółtych tonów należy używać w przypadku narzędzi, które tworzą obiekty. Jako przykład można podać środowiska pracy Część i Rysunek Roboczy.
Używaj niebieskich odcieni dla narzędzi, które modyfikują obiekty. Jako przykład, zobacz środowiska pracy Część i Rysunek Roboczy.
Używaj odcieni turkusu dla narzędzi związanych z widokiem; przykład można znaleźć w menu Widoku.
Używaj czerwonych tonów dla narzędzi związanych z wiązaniami. Przykład można znaleźć w środowisku pracy Szkicownik.
Dlaczego ograniczać się do tych kolorów? Ograniczenie kolorów do określonej palety pomaga uniknąć niejednorodnej ikonografii i poprawia czytelność w przypadku wielu ikon.
Jak używać palety FreeCAD? Instalacja palety jest tak prosta, jak skopiowanie jej do folderu palety Inkscape.

Szerokość siatki i obrysu

Obowiązkowe

Ikony FreeCAD mają nominalny rozmiar 64 pikseli zarówno w szerokości, jak i wysokości. Podczas tworzenia lub edycji ikony należy upewnić się, że rozmiar dokumentu wynosi 64 x 64, a jednostkami są piksele (px). Pozostawienie wewnętrznego marginesu 2px pustej przestrzeni wokół obszaru dokumentu jest przydatne, ponieważ zapobiega efektom takim jak antyaliasing (rozmycie krawędzi). Oznacza to, że przestrzeń użytkowa dla ikony powinna wynosić 60 x 60, a krawędzie powinny pozostać puste.

Narysuj ikonę wewnątrz niebieskiego obszaru, a wszystko będzie działać poprawnie.

Zdecydowanie zaleca się również użycie siatki wizualnej, która ma mniejszą linię siatki co piksel i główną linię siatki co 2 piksele. Obrysy ikony powinny być wyrównane wzdłuż przecięć siatki pomocniczej.

Obrysy nie powinny być cieńsze niż 2px, z zaokrąglonymi nakładkami i narożnikami w większości przypadków. Obrysy mogą być grubsze, ale powinny być wielokrotnością 2 pikseli, aby zminimalizować rozmycie skalowania.

Siatka z obrysami będącymi wielokrotnością 2px.

Dlaczego używana jest ta siatka i rozmiar obrysu? Ze względów historycznych FreeCAD używa ikony 64x64, która jest następnie skalowana w dół. Nie jest to idealne rozwiązanie, ale dodaje charakteru. W rezultacie utrzymywanie rzeczy wyrównanych do siatki potęgi dwójki i grubości będących potęgami dwójki pomaga uniknąć lub przynajmniej złagodzić problemy z antyaliasingiem podczas ponownego skalowania.
Jak mogę się do tego zastosować? Jeśli używasz Inkscape, przejdź do File → Document Properties i potwierdź, że szerokość, wysokość i jednostki strony są prawidłowe. Następnie przejdź do zakładki Grids, kliknij New, ustaw jednostki na px, Spacing X i Spacing Y na 1 oraz Major grid line every na 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 unison with the highlight to ensure good form contrast on multiple background tones.

The dark edge of the icon is the outline.

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 do I comply with this? Simply add a stroke of 2px around every part of the icon that will be adjacent to the background color, that is, the outline is for external strokes. In case of shapes that have a hole in the middle, for example, a donut, the outline should also be added to 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 of 2px to help make that outline pop. On dark backgrounds, it's this highlight what will be providing the form to the icon.

The light highlight helps in dark backgrounds.

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, for example, you have a very thin line, you can opt out of it provided you have ensured enough contrast between the main color and the outline.
How do I comply with this? 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 only palette colors are used.

Subtle lighting effect coming from top left.

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 do I comply with this? Set the fill to be a linear or a radial gradient. In Inkscape this is available in the stroke and fill settings; with "F2" it is possible to move the nodes of the gradient around to make sure they are at the right angle.

Recommended recording format

All icons should be created in SVG format with a vector image application, such as Inkscape. This makes it easier to apply changes and derive additional icons in the same application space.

When committing icons to be used directly by FreeCAD (in a *.qrc file), save them as "Plain SVG". This will reduce the icon size and save the disk and memory space.

Closing remarks

Remember: SALCHO, Stroke, Alignment, Lighting, Color, Highlight, Outline

Here are some tips to check your work.

Checking size

Inkscape has a 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 64 pixels.

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 the next step. If not, adjust the highlight.
  3. Do the same but this time using the lightest color.
  4. Still looks OK? Great. Outlines and highlights have been used appropriately. Otherwise, adjust the outline.

Testing the icon against the darkest and lightest colors as background

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. Export your icon from SVG to a bitmap format, like .png or .jpg.
  2. Load your bitmap in an image program, and change it to grayscale. For example, in GIMP you would go to Image → Mode → Grayscale.
  3. Inkscape allows you to convert the SVG directly to grayscale using Extensions → Color → Grayscale.
  4. Can you still clearly make out any internal details? Great. The contrast is good.

A grayscale image allows you to more easily identify problems in contrast, as only a mix of black and white is present. Testing grayscale images is also good for colorblind users. If they can see the details in a grayscale image, then the contrast of the fully colored image is probably good as well.

Testing the icon's contrast in grayscale

I can't make out all the details. The colors you've chosen have poor value contrast. Try using colors that are further apart in your 4 tone palette, that is, a highlight green beside a highlight yellow will be difficult to see, knock one of those colors down to Base or Dark.