Author Topic: Colour picker behaviour options?  (Read 668 times)

Offline surt

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Colour picker behaviour options?
« on: July 22, 2012, 06:41:06 am »
The colour picker uses some kind of area sampling right? Is there any hope of getting the size of the sampling area exposed and manipulable somewhere in the GUI or just an option for single-point sampling?

I'm playing with rough game mocking in MyPaint for eventual down-scaling and clean-up into pixel art, but the colour picker's area sampling screws with my colour control so I end up with many similar colours which can be a pain to consolidate.
« Last Edit: July 22, 2012, 06:44:55 am by surt »

Offline maxy

  • Moderator
  • Hero Member
  • *****
  • Posts: 549
  • Karma: +8/-0
Re: Colour picker behaviour options?
« Reply #1 on: August 04, 2012, 11:29:57 am »
Most brushes will mix color on the canvas anyway, so you always get half-tones even if you only pick a single pixel. MyPaint isn't really optimized for pixel art (have you tried mtpaint?).

But it's easy enough to hack in what you want, e.g. in gui/colors/picker.py:

Code: [Select]
gui/colors/picker.py:def get_color_at_pointer(widget, size=3):
gui/colors/picker.py-    """Returns the colour at the current pointer position.
gui/colors/picker.py-
gui/colors/picker.py-    The colour returned is averaged over a square of `size`x`size` centred at
gui/colors/picker.py-    the pointer.
gui/colors/picker.py-
gui/colors/picker.py-    """

Change that to

Code: [Select]
    def get_color_at_pointer(widget, size=3):
        size = 1
        """Returns the colour at the current pointer position.
        ...

then it should always pick just one pixel.
« Last Edit: August 04, 2012, 11:31:58 am by maxy »

InTiLinuX Forum

Re: Colour picker behaviour options?
« Reply #1 on: August 04, 2012, 11:29:57 am »


Social Bookmarks

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

Making International Conference Calls Günstige Soirée Robes de Cérémonie