# dffmonolith/palettes architecture

> Architecture diagram of the GitHub repository dffmonolith/palettes, 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/dffmonolith/palettes
- Repository: https://github.com/dffmonolith/palettes

## Overview

Palettes is a standalone browser tool for creating and editing color palettes. The main workflow is to open the app, generate or adjust swatches, organize them into named palettes, and save them in browser storage; users can also import, export, or merge palettes as text. The graph separates those domain capabilities while keeping their implementation in the single JavaScript module. The README documents the features and file roles; source excerpts are partial, so internal calls between features are not inferred.

Main entry points: [`Palettes.js`](https://github.com/dffmonolith/palettes/blob/main/Palettes.js) (Named palettes), [`Palettes.html`](https://github.com/dffmonolith/palettes/blob/main/Palettes.html) (Palette app), [`Palettes-Help.html`](https://github.com/dffmonolith/palettes/blob/main/Palettes-Help.html) (User guide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Browser interface"]
  node_app["Palette app<br/>[Palettes.html]"]
  node_presentation["App styling<br/>[Palettes.css]"]
  node_help["User guide<br/>[Palettes-Help.html]"]
end

subgraph group_editing["Palette editing"]
  node_generation["Constrained generation<br/>[Palettes.js]"]
  node_swatch_editing["Swatch editing<br/>[Palettes.js]"]
  node_swatch_arranging["Swatch arranging<br/>[Palettes.js]"]
end

subgraph group_management["Palette management"]
  node_palette_management["Named palettes<br/>[Palettes.js]"]
  node_color_conversion["Decimal/hex converter<br/>[Palettes.js]"]
end

subgraph group_persistence["Storage and exchange"]
  node_browser_storage[("Browser storage")]
  node_text_exchange["Text import/export<br/>[Palettes.js]"]
end

node_user(("Palette user"))

node_user -->|"opens"| node_app
node_app -->|"hosts"| node_generation
node_user -->|"opens"| node_help
node_generation -.->|"guides"| node_swatch_editing
node_user -->|"fine-tunes"| node_swatch_editing
node_user -->|"reorders"| node_swatch_arranging
node_user -->|"manages"| node_palette_management
node_user -->|"converts"| node_color_conversion
node_user -->|"imports or exports"| node_text_exchange
node_palette_management -->|"saves palettes"| node_browser_storage
node_text_exchange -->|"moves palette data"| node_palette_management

click node_app "https://github.com/dffmonolith/palettes/blob/main/Palettes.html"
click node_presentation "https://github.com/dffmonolith/palettes/blob/main/Palettes.css"
click node_help "https://github.com/dffmonolith/palettes/blob/main/Palettes-Help.html"
click node_generation "https://github.com/dffmonolith/palettes/blob/main/Palettes.js"
click node_swatch_editing "https://github.com/dffmonolith/palettes/blob/main/Palettes.js"
click node_swatch_arranging "https://github.com/dffmonolith/palettes/blob/main/Palettes.js"
click node_palette_management "https://github.com/dffmonolith/palettes/blob/main/Palettes.js"
click node_color_conversion "https://github.com/dffmonolith/palettes/blob/main/Palettes.js"
click node_text_exchange "https://github.com/dffmonolith/palettes/blob/main/Palettes.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_app,node_presentation,node_help,node_user toneBlue
class node_generation,node_swatch_editing,node_swatch_arranging toneAmber
class node_palette_management,node_color_conversion toneMint
class node_browser_storage,node_text_exchange toneRose
```

## Components

### Browser interface

- [Palette app](https://github.com/dffmonolith/palettes/blob/main/Palettes.html): `Palettes.html`
- [App styling](https://github.com/dffmonolith/palettes/blob/main/Palettes.css): `Palettes.css`
- [User guide](https://github.com/dffmonolith/palettes/blob/main/Palettes-Help.html): `Palettes-Help.html`

### Palette editing

- [Constrained generation](https://github.com/dffmonolith/palettes/blob/main/Palettes.js): `Palettes.js`
- [Swatch editing](https://github.com/dffmonolith/palettes/blob/main/Palettes.js): `Palettes.js`
- [Swatch arranging](https://github.com/dffmonolith/palettes/blob/main/Palettes.js): `Palettes.js`

### Palette management

- [Named palettes](https://github.com/dffmonolith/palettes/blob/main/Palettes.js): `Palettes.js`
- [Decimal/hex converter](https://github.com/dffmonolith/palettes/blob/main/Palettes.js): `Palettes.js`

### Storage and exchange

- **Browser storage**
- [Text import/export](https://github.com/dffmonolith/palettes/blob/main/Palettes.js): `Palettes.js`

### Other components

- **Palette user**

## Connections

- Palette user → Palette app: opens (evidence: `README.md`)
- Palette app → Constrained generation: hosts (evidence: `README.md`)
- Palette user → User guide: opens (evidence: `README.md`)
- Constrained generation → Swatch editing: guides (evidence: `Palettes.js`)
- Palette user → Swatch editing: fine-tunes (evidence: `README.md`)
- Palette user → Swatch arranging: reorders (evidence: `README.md`)
- Palette user → Named palettes: manages (evidence: `README.md`)
- Palette user → Decimal/hex converter: converts (evidence: `README.md`)
- Palette user → Text import/export: imports or exports (evidence: `README.md`)
- Named palettes → Browser storage: saves palettes (evidence: `README.md`)
- Text import/export → Named palettes: moves palette data (evidence: `README.md`)
