# archistico/shadeofcolor2 architecture

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

- Interactive diagram: https://gitdiagram.com/archistico/shadeofcolor2
- Repository: https://github.com/archistico/shadeofcolor2

## Overview

ShadeOfColor is a command-line utility that encodes arbitrary file bytes into PNG pixels and restores them later. The principal workflow starts with a user-supplied command, passes through argument dispatch, and invokes the conversion implementation; that implementation handles both pixel encoding and decoding, including embedded filename/size metadata and SHA1 verification. The README documents the two-way conversion and integrity check. Source excerpts show the calls and ImageSharp usage; filesystem interactions are visible in the conversion code.

Main entry points: [`ShadeOfColor2/FileToImage.cs`](https://github.com/archistico/shadeofcolor2/blob/main/ShadeOfColor2/FileToImage.cs) (File-image codec), [`ShadeOfColor2/Program.cs`](https://github.com/archistico/shadeofcolor2/blob/main/ShadeOfColor2/Program.cs) (Command dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_cli["Command dispatcher<br/>[Program.cs]"]
node_codec["File-image codec<br/>[FileToImage.cs]"]
node_filesystem["Local files"]
node_imagesharp["ImageSharp"]

node_user -->|"supplies command"| node_cli
node_cli -->|"calls conversion"| node_codec
node_codec -->|"reads and writes"| node_filesystem
node_codec -->|"loads and saves pixels"| node_imagesharp

click node_cli "https://github.com/archistico/shadeofcolor2/blob/main/ShadeOfColor2/Program.cs"
click node_codec "https://github.com/archistico/shadeofcolor2/blob/main/ShadeOfColor2/FileToImage.cs"

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_user toneBlue
class node_cli,node_codec toneTeal
class node_filesystem,node_imagesharp toneIndigo
```

## Components

### Other components

- **User**
- [Command dispatcher](https://github.com/archistico/shadeofcolor2/blob/main/ShadeOfColor2/Program.cs): `ShadeOfColor2/Program.cs`
- [File-image codec](https://github.com/archistico/shadeofcolor2/blob/main/ShadeOfColor2/FileToImage.cs): `ShadeOfColor2/FileToImage.cs`
- **Local files**
- **ImageSharp**

## Connections

- User → Command dispatcher: supplies command (evidence: `ShadeOfColor2/Program.cs`)
- Command dispatcher → File-image codec: calls conversion (evidence: `ShadeOfColor2/Program.cs`)
- File-image codec → Local files: reads and writes (evidence: `ShadeOfColor2/FileToImage.cs`)
- File-image codec → ImageSharp: loads and saves pixels (evidence: `ShadeOfColor2/FileToImage.cs`)
