Index Mode should add paintbrush color if new and space in palette exists
Operating System: (if feature is platform specific) any
Description of the feature
Index mode should add paintbrush color if not already present and space in palette exists
Please describe your feature with details.
It would be nice if when working in indexed mode, changing the foreground/background color and then using that color in the image would (optionally? require user verification?) add that color to the indexed mode palette if it is not there already and if the palette is not full.
From pippin:
What you are suggesting; to add the directly chosen color of the paintbrush/pencil tool, if there is empty slots in the palette would not conflict with this and be a nice addition... It would have to be only the directly selected foreground color though and not its antialiased results with various background pixels which would be ohter colors implicity attempted to be inserted. Since the more complete port to babl/GEGL with 2.10 GIMP is no longer special casing INDEXED/GRAYSCALE mode from RGB. This meant as new features we gained anti-aliasing for the paintbrush in indexed mode, ability to blur and do other filters; as well as anti-aliased results when merging down layers/text-layers - this would quickly exhaust the free slots in the palette if all attempted to be used colors were added (checking if the current foreground color is part of the palette before starting a new stroke is also a more feasible code change than always dynamically growin the palette).
Add screenshots, design images or other files which would help for understanding the feature or for implementation. Also add links when needed, for instance for implementation standards or other relevant resources.
Use cases
If not obvious, explain the use cases or problems to solve.
Currently, attempting to paint into an image in indexed mode using a new color paints black.