# mdshihab56/pigmentiq architecture

> Architecture diagram of the GitHub repository mdshihab56/pigmentiq, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mdshihab56/pigmentiq
- Repository: https://github.com/mdshihab56/pigmentiq

## Overview

PigmentIQ is an offline art-reference and color-planning workbench. An artist loads an image or enters a target color, explores extracted colors or paint recipes, and can consult pencil, brand, and surface guides before exporting a specification sheet. The app controller coordinates the interactive studio; separate modules provide extraction, color science, mixing, reference data, and export. The graph preserves the README’s major capabilities. Some UI-to-module links are documented rather than visible in the sampled controller excerpts.

Main entry points: [`js/app.js`](https://github.com/mdshihab56/pigmentiq/blob/main/js/app.js) (App Controller), [`index.html`](https://github.com/mdshihab56/pigmentiq/blob/main/index.html) (Studio Interface), [`js/image-extractor.js`](https://github.com/mdshihab56/pigmentiq/blob/main/js/image-extractor.js) (Image Extractor), [`js/recipe-engine.js`](https://github.com/mdshihab56/pigmentiq/blob/main/js/recipe-engine.js) (Paint Recipe Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_studio["Studio Workflow"]
  node_interface["Studio Interface<br/>[index.html]"]
  node_controller["App Controller<br/>[app.js]"]
end

subgraph group_color["Color Tools"]
  node_extractor["Image Extractor<br/>[image-extractor.js]"]
  node_color_math["Color Science<br/>[color-math.js]"]
  node_recipe["Paint Recipe Engine<br/>[recipe-engine.js]"]
  node_montmarte[("Mont Marte Colors<br/>[montmarte-db.js]")]
end

subgraph group_guides["Artist Guides"]
  node_sketch[("Graphite Guide<br/>[sketch-db.js]")]
  node_brands[("Art Brands Guide<br/>[brands-db.js]")]
  node_surfaces[("Surface Guide<br/>[surfaces-db.js]")]
end

subgraph group_export["Specification Export"]
  node_exporter["Sheet Exporter<br/>[export-manager.js]"]
end

subgraph group_settings["Studio Settings"]
  node_audio["Audio Feedback<br/>[audio.js]"]
end

node_artist(("Artist"))
node_save_picker["Browser Save Picker"]

node_artist -->|"uses"| node_interface
node_interface -.->|"hosts"| node_controller
node_controller -->|"requests extraction"| node_extractor
node_extractor -->|"uses color metrics"| node_color_math
node_controller -->|"requests recipes"| node_recipe
node_recipe -->|"filters color pool"| node_montmarte
node_controller -->|"filters kit colors"| node_montmarte
node_controller -->|"shows recommendations"| node_sketch
node_controller -->|"shows brand guide"| node_brands
node_controller -->|"shows surface guide"| node_surfaces
node_controller -->|"requests export"| node_exporter
node_exporter -->|"opens save dialog"| node_save_picker
node_controller -->|"sets sound controls"| node_audio

click node_interface "https://github.com/mdshihab56/pigmentiq/blob/main/index.html"
click node_controller "https://github.com/mdshihab56/pigmentiq/blob/main/js/app.js"
click node_extractor "https://github.com/mdshihab56/pigmentiq/blob/main/js/image-extractor.js"
click node_color_math "https://github.com/mdshihab56/pigmentiq/blob/main/js/color-math.js"
click node_recipe "https://github.com/mdshihab56/pigmentiq/blob/main/js/recipe-engine.js"
click node_montmarte "https://github.com/mdshihab56/pigmentiq/blob/main/js/montmarte-db.js"
click node_sketch "https://github.com/mdshihab56/pigmentiq/blob/main/js/sketch-db.js"
click node_brands "https://github.com/mdshihab56/pigmentiq/blob/main/js/brands-db.js"
click node_surfaces "https://github.com/mdshihab56/pigmentiq/blob/main/js/surfaces-db.js"
click node_exporter "https://github.com/mdshihab56/pigmentiq/blob/main/js/export-manager.js"
click node_audio "https://github.com/mdshihab56/pigmentiq/blob/main/js/audio.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_interface,node_controller,node_save_picker toneBlue
class node_extractor,node_color_math,node_recipe,node_montmarte toneAmber
class node_sketch,node_brands,node_surfaces toneMint
class node_exporter toneRose
class node_audio,node_artist toneIndigo
```

## Components

### Studio Workflow

- [Studio Interface](https://github.com/mdshihab56/pigmentiq/blob/main/index.html): `index.html`
- [App Controller](https://github.com/mdshihab56/pigmentiq/blob/main/js/app.js): `js/app.js`

### Color Tools

- [Image Extractor](https://github.com/mdshihab56/pigmentiq/blob/main/js/image-extractor.js): `js/image-extractor.js`
- [Color Science](https://github.com/mdshihab56/pigmentiq/blob/main/js/color-math.js): `js/color-math.js`
- [Paint Recipe Engine](https://github.com/mdshihab56/pigmentiq/blob/main/js/recipe-engine.js): `js/recipe-engine.js`
- [Mont Marte Colors](https://github.com/mdshihab56/pigmentiq/blob/main/js/montmarte-db.js): `js/montmarte-db.js`

### Artist Guides

- [Graphite Guide](https://github.com/mdshihab56/pigmentiq/blob/main/js/sketch-db.js): `js/sketch-db.js`
- [Art Brands Guide](https://github.com/mdshihab56/pigmentiq/blob/main/js/brands-db.js): `js/brands-db.js`
- [Surface Guide](https://github.com/mdshihab56/pigmentiq/blob/main/js/surfaces-db.js): `js/surfaces-db.js`

### Specification Export

- [Sheet Exporter](https://github.com/mdshihab56/pigmentiq/blob/main/js/export-manager.js): `js/export-manager.js`

### Studio Settings

- [Audio Feedback](https://github.com/mdshihab56/pigmentiq/blob/main/js/audio.js): `js/audio.js`

### Other components

- **Artist**
- **Browser Save Picker**

## Connections

- Artist → Studio Interface: uses (evidence: `README.md`)
- Studio Interface → App Controller: hosts
- App Controller → Image Extractor: requests extraction (evidence: `README.md`)
- Image Extractor → Color Science: uses color metrics (evidence: `js/image-extractor.js`)
- App Controller → Paint Recipe Engine: requests recipes (evidence: `README.md`)
- Paint Recipe Engine → Mont Marte Colors: filters color pool (evidence: `js/recipe-engine.js`)
- App Controller → Mont Marte Colors: filters kit colors (evidence: `js/app.js`)
- App Controller → Graphite Guide: shows recommendations (evidence: `README.md`)
- App Controller → Art Brands Guide: shows brand guide (evidence: `README.md`)
- App Controller → Surface Guide: shows surface guide (evidence: `README.md`)
- App Controller → Sheet Exporter: requests export (evidence: `README.md`)
- Sheet Exporter → Browser Save Picker: opens save dialog (evidence: `js/export-manager.js`)
- App Controller → Audio Feedback: sets sound controls (evidence: `js/app.js`)
