Skip to content

Icon Anatomy

Spec sources: specs/icons/

A Koder product icon is a 3D symbol where the form is the concept — no text, no frame — generated from a single master SVG and exported to every platform by the kicon tool, never hand-drawn per density. The normative rules live in icons/products.kmd and the per-platform export matrix in generation-targets.kmd.

An icon decomposes into four families of elements: geometric (the grid and its zones), visual (the form and the colour), layer (adaptive delivery) and metadata.

Concentric zones, visual elements, technical layers and metadata.
Figure 1 — Icon anatomy: zones, visual elements, technical layers and metadata.

1. Geometric / structural elements

#ElementDescriptionKoder value
1CanvasFull icon area (coordinate system)viewBox 0 0 512 512
2Live areaWhat survives the OS maskvaries by OEM
3Safe zoneCentre region never clipped66.7% (Android); 80% (PWA)
4Bleed zoneOuter band that may be clipped16.7% per side (Android)
5Margin / paddingBand between art and edge, equal on 4 sidestarget ~10%/side (§3)
6Keyline shapesGuide shapes that equalise optical weightsquare/circle/rectangle
7Centre / optical axisVisual balance point (not the geometric centre)centring ±4px

2. Visual / content elements

#ElementDescriptionRule
8Dominant silhouetteThe main form — it is the iconR2 (a single one)
9Primary glyphSymbol naming the function (envelope, arrow, mic…)R5 (solid white)
10Secondary detailSupporting elementsR5 (opacity 0.3–0.95)
11Negative spaceVoid reinforcing figure-ground readingfavour
12Dominant colour (hue)Product brand colourR6 (mono-hue)
13GradientColour variation giving light/directionR3 (vertical 700→500→400)
14Depth overlayDepth/seating shadowR4 (black 0→0.18)
15Sheen overlayDiscreet glossR4 (white 0.12→0)
16Drop shadowCast shadow separating from backgroundfeDropShadow
17Directional lightCoherent light source (from above)R3

3. Technical layers (adaptive delivery)

#LayerFile / formContent
18Master SVGicon.svg (product root)single source, 512²
19Foregroundic_launcher_foreground.pngsymbol, transparent background
20Background@color/ic_launcher_backgroundbrand colour (not white)
21Monochromeic_launcher_monochrome.pngwhite silhouette (Android 13+)
22Legacyic_launcher.pngAPI <26, no layers
23Adaptive descriptormipmap-anydpi-v26/ic_launcher.xmlbinds bg+fg+monochrome
24Maskable / Darkicon-512-maskable · icon-dark.svgPWA 80% · dark variant

4. Family grammar (normative — R1 to R7)

RuleDefinition
R1 — Absolute framelessNo rectangle/background shape covering the canvas in the master. The silhouette is the icon. kicon validate rejects a full-canvas background (hard error).
R2 — One dominant silhouetteReduce to a single form. Forbidden: skeuomorphism, literal scene, multiple elements, thin line-art.
R3 — Gradient = light from aboveVertical linearGradient in userSpaceOnUse, 3 stops: 700 (base) → 500 (mid) → 400 (top).
R4 — Depth/sheen overlaysdep: black 0→0.18 (base). sh: white 0.12→0 (top). Both userSpaceOnUse.
R5 — White internal detailPrimary glyph solid white (#fff); secondary detail 0.3–0.95. Legibility floor 32×32px.
R6 — Mono-hueOne dominant hue per product. No polychrome accent (except the R3 traversal).
R7 — ~92% fill in masterThe silhouette fills ~92% of the canvas (optical margin ±4%); kicon generate shrinks it for the adaptive foreground.

5. Geometry — margin and area

The margin is a linear measure (a band per side). Converting to canvas area: a linear margin m per side leaves content of side (1−2m) → content area = (1−2m)².

Linear margin / sideContent (% of area)Background (% of area)Typical use
8%70.6%29.4%Material legacy keyline
10% (Koder target)64.0%36.0%logo-in-tile (macOS / PWA) — sweet-spot
12%57.8%42.2%roomier alternative
16.7%44.4%55.6%Android adaptive foreground (anti-clip OEM)

6. Generation — kicon

Every variant is generated from the master via kicon (never hand-rendered per density). Run kicon validate to enforce the R1–R7 grammar + safe-circle, and kicon generate for the per-platform outputs (Android mipmaps, iOS, macOS .icns, Windows .ico, Linux hicolor, web favicons, PWA maskable, store listing).

7. Inscribed glyph — figure inside a UI container (normative)

Chapters 1–6 cover the *product icon* (3D, launcher). This section closes the other plane: the *UI glyph inside a container* — circular button, tile, chip, pill. Full normative spec (formulas, keylines, T1–T4 tests): specs/icons/inscribed-glyph.kmd.

The problem has three objects: the *container* K (center C, margin m), the *figure* F (the set of inked points — fills and strokes counted at their thickness) and the *ink bounding box* B. Inscribing means satisfying three independent equalities: center of B ≡ C; scaled ink touching the usable limit K⊖m; and the same occupancy ratio across all siblings in a family.

Inscribed glyph anatomy: container, margin, ink bounding box and figure.

*The rule that prevents 90% of defects: measure the INK, never the frame.* Two figures sharing a viewBox can paint extents 40% apart — at the same scale, a family shows visibly unequal glyphs. The protocol, in order: measure ink → center within the frame → scale by the container → compose → optical adjustment (if asymmetric) → measure back.

The maximum scale depends on the *container's shape* (general formulation: Minkowski functional of the margin-eroded container). In a circle, the ink point farthest from the center rules; in a square/squircle, the largest coordinate; in a pill, the central band height:

The same figure gets different scales in circle, squircle and pill.

For heterogeneous families, consistency uses keylines (as Material/SF Symbols do): target extents per bounding-box proportion — square 0.82, portrait/landscape 0.90 on the dominant axis, circular 0.86 — compensating each shape's perceived mass.

Anti-pattern: frame-based scaling yields unequal ink; ink-based scaling equalizes occupancy.