matt-dray / pixeltrix

:space_invader::computer_mouse: R package: make pixel art interactively in a plot window, get a matrix, make a gif
Other
21 stars 0 forks source link

Let user select pixel state colours in `click_pixels()` #14

Closed matt-dray closed 1 year ago

matt-dray commented 1 year ago

With click_pixels()you currently you get darkening shades of grey when you click a pixel consecutively.

Add a colours option (or similar name). Suggest greys are retained by default if user doesn't pass a vector of colours:

click_pixels(colours = NULL)

But a user could do this:

click_pixels(n_states = 4, n_colours = c("black", "red", "blue", "yellow))

Where length(colours) should match n_states. The order of colours is the order they will change when you click a single pixel consecutively. To begin, all pixels will take the first-provided colour. Might be annoying if you don't know that's about to happen.

matt-dray commented 1 year ago

Whoops, this already exists in #3.