|
| 1 | +# Filter Documentation Figure Style Guide |
| 2 | + |
| 3 | +Visual style and file conventions for figures generated to support filter documentation. Established during the documentation review project (batches 1+) so that figures across plugins look consistent. Reference palette: `docs/style_palette_final.svg` in this repo. |
| 4 | + |
| 5 | +## When to Add a Figure |
| 6 | + |
| 7 | +**Add a figure when:** |
| 8 | + |
| 9 | +- The filter operates on spatial data and the spatial relationship matters (kernels, neighborhoods, alignment, neighbor counts). |
| 10 | +- The filter has a multi-step algorithm that benefits from a flowchart or sequence diagram. |
| 11 | +- The filter transforms data in a way easier to show than describe (orientation conversions, geometry operations). |
| 12 | +- The filter has parameters whose effect is non-obvious (kernel radius, dilation iterations, coordination number). |
| 13 | + |
| 14 | +**Skip a figure when:** |
| 15 | + |
| 16 | +- The filter performs a simple mathematical operation (radians-to-degrees, threshold). |
| 17 | +- The filter is a basic I/O operation (read file, write file). |
| 18 | +- The filter's behavior is fully captured by its parameter names (delete data, rename data). |
| 19 | + |
| 20 | +## Font |
| 21 | + |
| 22 | +``` |
| 23 | +'Segoe UI', 'Helvetica Neue', Arial, sans-serif |
| 24 | +``` |
| 25 | + |
| 26 | +| Element | Size | Weight | Color | |
| 27 | +|---------|------|--------|-------| |
| 28 | +| Figure title | 17-18px | Bold (700) | #2C3E50 | |
| 29 | +| Section heading | 14px | Semibold (600) | #2C3E50 | |
| 30 | +| Body text | 13px | Regular (400) | #555555 | |
| 31 | +| Captions / notes | 11px | Italic | #888888 | |
| 32 | + |
| 33 | +## Color Palette |
| 34 | + |
| 35 | +### Primary (Diagram Elements) |
| 36 | + |
| 37 | +| Role | Color | Hex | Usage | |
| 38 | +|------|-------|-----|-------| |
| 39 | +| Focus | Dark Blue | #2874A6 | Center cell, primary element, section headers | |
| 40 | +| Active | Light Blue | #AED6F1 | Kernel neighbors, included elements | |
| 41 | +| Inactive | Light Gray | #E8ECF0 | Outside kernel, excluded elements | |
| 42 | + |
| 43 | +### Semantic Accents |
| 44 | + |
| 45 | +| Role | Color | Hex | Usage | |
| 46 | +|------|-------|-----|-------| |
| 47 | +| Danger / Warning | Red | #E74C3C | Thread-safety warnings, invalid approaches, common mistakes | |
| 48 | +| Good / Correct | Green | #27AE60 | Recommended approaches, valid results, correct measurements | |
| 49 | +| Annotation | Purple | #8E44AD | Brackets, dimensions, labels, measurements | |
| 50 | +| Tip / Highlight | Amber | #E67E22 | Tips, parameters of interest, optional recommendations | |
| 51 | + |
| 52 | +### Supporting |
| 53 | + |
| 54 | +| Role | Color | Hex | Usage | |
| 55 | +|------|-------|-----|-------| |
| 56 | +| Primary text | Dark Slate | #2C3E50 | Headings, primary labels | |
| 57 | +| Secondary text | Medium Gray | #5D6D7E | Secondary labels, descriptions | |
| 58 | +| Card background | White | #FFFFFF | Figure card background | |
| 59 | +| Formula background | Pale Blue | #EBF5FB | Formula / equation highlight boxes | |
| 60 | +| Warning background | Pale Red | #FDEDEC | Warning callout box fill | |
| 61 | +| Success background | Pale Green | #EAFAF1 | Success callout box fill | |
| 62 | +| Annotation background | Pale Purple | #F4ECF7 | Note callout box fill | |
| 63 | +| Tip background | Pale Amber | #FEF5E7 | Tip callout box fill | |
| 64 | +| Page background | Off-white | #F0F2F5 | Outer page fill (when used) | |
| 65 | + |
| 66 | +## Callout Boxes |
| 67 | + |
| 68 | +Four semantic callout box types are available: |
| 69 | + |
| 70 | +- **Warning (Red)** — `!` icon, #FDEDEC background, #E74C3C border. For dangers and things to watch out for. |
| 71 | +- **Good / Correct (Green)** — checkmark icon, #EAFAF1 background, #27AE60 border. For recommended approaches. |
| 72 | +- **Note (Purple)** — `i` icon, #F4ECF7 background, #8E44AD border. For general annotations and clarifications. |
| 73 | +- **Tip (Amber)** — star icon, #FEF5E7 background, #E67E22 border. For tips and highlights. |
| 74 | + |
| 75 | +## Section Headers |
| 76 | + |
| 77 | +Colored bars with white text, using the semantic color that best fits the section content. Default to blue (#2874A6) for neutral sections. |
| 78 | + |
| 79 | +## File Format and Naming |
| 80 | + |
| 81 | +- **Author as SVG.** Hand-write or generate the source. |
| 82 | +- **Convert to PNG at 2x resolution** using `rsvg-convert -z 2 source.svg -o source.png`. The 2x scale provides a clean appearance on high-DPI displays. |
| 83 | +- **Keep both SVG and PNG** in the plugin's `<plugin>/docs/Images/` directory (e.g., `src/Plugins/OrientationAnalysis/docs/Images/`). |
| 84 | +- **Reference the PNG** in the filter documentation markdown, not the SVG. |
| 85 | +- **Naming convention:** `<FilterName>_<Description>.png`. Examples: |
| 86 | + - `ComputeKernelAvgMisorientations_1D_Radius1.png` |
| 87 | + - `ComputeAvgCAxes_HexagonalCAxis.png` |
| 88 | + - `ComputeSchmids_SchmidFactor.png` |
| 89 | + |
| 90 | +## Markdown Reference Pattern |
| 91 | + |
| 92 | +Use the figure caption as the alt text and as a short Fig. N descriptor: |
| 93 | + |
| 94 | +```markdown |
| 95 | + |
| 96 | +``` |
| 97 | + |
| 98 | +For paired before/after figures, use a 2-column table: |
| 99 | + |
| 100 | +```markdown |
| 101 | +| Before | After | |
| 102 | +|----------------------------------|----------------------------------| |
| 103 | +|  |  | |
| 104 | +``` |
| 105 | + |
| 106 | +## Reference SVGs |
| 107 | + |
| 108 | +- `docs/style_palette_final.svg` — canonical color palette, font, and callout box styles. Open in any SVG viewer to copy colors. |
| 109 | +- Existing finished figures in `src/Plugins/OrientationAnalysis/docs/Images/` (especially `ComputeKernelAvgMisorientations_*.svg` and `ComputeAvgCAxes_HexagonalCAxis.svg`) are good reference templates to fork from. |
0 commit comments