This project generates PNG images containing grids of 8x8 pixel patterns. It explores different permutations of patterns based on a modular arithmetic logic for colour dithering.
The tool creates a grid where each cell contains a unique 8x8 pattern. It renders a title and labels for the grid. The patterns are generated using a "ColourSource" algorithm that determines the color of each pixel based on its coordinates and a mode index.
To run the project, you need Go installed.
go run cmd/eightbyeight/main.goThis will generate four files in the current directory:
out_bw.png: Classic Black on Whiteout_terminal.png: Green on Black (Terminal style)out_solarized.png: Solarized Light color schemeout_mixing.png: CGA Color Mixing
The output are PNG images with a title, a grid of patterns, and labels.
Examples of generated patterns can be found in the exampledata/ directory.
Here are the generated outputs:
The project includes a GridBuilder to programmatically configure and generate these pattern grids.
import "github.com/arran4/eightbyeight"
// ...
builder := eightbyeight.NewGridBuilder().
WithTitle("My Custom Grid").
WithDimensions(10, 5). // 10 rows, 5 columns
WithColors([]color.Color{color.White, color.RGBA{255, 0, 0, 255}})
img := builder.Generate()
builder.Save("my_grid.bmp")


