Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gradient color picker@mav #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

TheMaverickProgrammer
Copy link

@TheMaverickProgrammer TheMaverickProgrammer commented Nov 18, 2022

Adds the following features:

  • optional initial background color
  • new gradient picker abstraction with an equation callback to color the BoxDecorator
  • comes with a slider widget to indicate where the color was clicked
  • gradient picker used to sample colors from the rainbow
  • gradient picker used to sample luminosity
  • can hold click/drag finger to draw continuously

Changes:

  • Not using the color buffer to store palette indices. The color is read from the palette list and drawn to that pixel directly
    • this was needed to let background colors work
  • Palette index is now optional in the callback tap details object for this reason. colorValue was added to be more reliably used as you will be guaranteed to have a color
  • Color palette is now optional. if color palette is null, the editor defaults to using the rainbow and lumen color pickers

Preview:
image

I hope this PR is accepted. I want to keep adding features. I was thinking of adding a lasso tool, flood fill, and brush sizes. Let me know if that is interesting to you.

Mav added 4 commits November 17, 2022 02:25
…ction. TODO: show the position of the gradient click as an overlay.
…r first launch of the editable image widget. everything works well!
…and they respect the band size from the gradient inkwell widget. Added luminosity slider. Added code to respect the axis alignment too! Finally, replaced the palette lookup code so that the pixel editor can draw colors directly with or without palette (this makes the background color work with palettes too)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant