Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .classpath

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build & Release

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
artifact: colorblind
- goos: windows
goarch: amd64
artifact: colorblind.exe
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version: "1.24.x"

- name: Install fyne-cross
run: go install github.com/fyne-io/fyne-cross@latest

- name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
run: fyne-cross ${{ matrix.goos }} -arch ${{ matrix.goarch }} -app-id com.colorblind.app -output colorblind

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: colorblind-${{ matrix.goos }}-${{ matrix.goarch }}
path: fyne-cross/bin/${{ matrix.goos }}-${{ matrix.goarch }}/${{ matrix.artifact }}

release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Get commit info
id: commit
run: echo "short_sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Package release assets
run: |
cd artifacts/colorblind-linux-amd64
tar czf ../../colorblind-linux-amd64.tar.gz colorblind
cd ../colorblind-windows-amd64
zip ../../colorblind-windows-amd64.zip colorblind.exe

- name: Create latest release
if: github.ref_name == 'master'
uses: ncipollo/release-action@v1
with:
tag: latest
name: Latest Release
artifacts: "colorblind-linux-amd64.tar.gz,colorblind-windows-amd64.zip"
allowUpdates: true
replacesArtifacts: true
makeLatest: true
prerelease: false
body: |
Latest build from `master`

Commit: ${{ github.sha }}
Short SHA: ${{ steps.commit.outputs.short_sha }}
Built on: ${{ github.event.head_commit.timestamp }}

- name: Create branch pre-release
if: github.ref_name != 'master'
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: "Pre-release: ${{ github.ref_name }}"
artifacts: "colorblind-linux-amd64.tar.gz,colorblind-windows-amd64.zip"
allowUpdates: true
replacesArtifacts: true
makeLatest: false
prerelease: true
body: |
Pre-release build from branch: `${{ github.ref_name }}`

Commit: ${{ github.sha }}
Short SHA: ${{ steps.commit.outputs.short_sha }}
Built on: ${{ github.event.head_commit.timestamp }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/bin/
/colorblind
23 changes: 0 additions & 23 deletions .project

This file was deleted.

49 changes: 35 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
# ColorBlind
A Java application to generate reverse colorblindness tests

A Go desktop application that generates Ishihara-style reverse colorblindness test plates.

This application is intended to:
The app fills a canvas with thousands of same-colored circles, then recolors circles inside a hidden shape with a slightly different shade of magenta. To someone with normal color vision, the plate looks uniform. To someone with a specific type of color blindness, the hidden shape becomes clearly visible.

-Learn javaFX, which i will use during this last university year
## How it works

-Practice programming (damn, i need to improve my OOP skills!)

-Provide the colorblind community (and thus myself too) a tool to draw reverse colorblind tests

-Have fun


I will base my work on this theory:
https://www.reddit.com/r/ColorBlind/comments/2ds5u1/this_is_a_reversecolorblind_test_normal_color/cjsxha1
quoting the post:
Based on [this theory](https://www.reddit.com/r/ColorBlind/comments/2ds5u1/this_is_a_reversecolorblind_test_normal_color/cjsxha1):

(hit ctrl-f and press either 3 or 4 or 5)

Expand Down Expand Up @@ -51,5 +42,35 @@ As viewed by a color regular, its just a block of numbers. As viewed by someone

a clearly identifiable shape.

The app applies this same principle visually — using two nearly identical magenta shades that only become distinguishable to people with specific color vision deficiencies.

## Screenshots

![App UI](program_preview.png)

![Example output](reverse_colorblind.png)

See [old output examples/](old%20output%20examples/) for outputs from the original Java version, or check out the [`original-java`](https://github.com/nikooo777/ColorBlind/tree/original-java) branch for the original JavaFX implementation — a learning project for OOP and JavaFX.

## Building

Requires Go and Fyne system libraries on Linux:

```bash
sudo apt-get install libgl-dev libx11-dev libxrandr-dev libxxf86vm-dev libxi-dev libxcursor-dev libxinerama-dev
```

```bash
go build -o colorblind .
./colorblind
```

## Controls

I hope you enjoy!
- **Generate** — creates a new plate with randomized circle positions and a hidden shape
- **Hidden Shape** — choose between a random circle or custom text as the hidden pattern
- **Density slider** — controls how many circles to place (10–2000)
- **Shade slider** — adjusts the magenta shade used for the hidden pattern; move it until the difference is barely perceptible to you
- **Confuser color** — pick a third color (via HSV picker, hex input, or presets) applied to 10% of non-shape circles to add visual noise
- **Show Shape toggle** — reveals the hidden shape outline for verification
- **File → Save PNG** — export the current plate as a PNG image
Loading