CodingTrain / CodingTrain/Suggestion-Box

multi color brayer matrix for a Coding challange?

Open
#1,829 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

I had this idea because I haven’t found any good Brayer matrix functions that let you work with a custom color array instead of just sticking to the typical R, G, B values that are either 0 or 255. Usually, the threshold is applied like this:

```
const threshold = ditherMatrix[x % 4][y % 4] / 15;
let newR = r > threshold * 255 ? 255 : 0;
let newG = g > threshold * 255 ? 255 : 0;
let newB = b > threshold * 255 ? 255 : 0;
```
This limits the colors to either full on or off, but I wanted a way to use more nuanced colors and still get that cool dithered effect, like using a set color array instead.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.