Results 1 to 10 of 60

Thread: Custom picker utility

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Location
    3438 ft above sea level
    Posts
    2,950
    OMG that is stoopid cool
    How clever you are !!
    Thanks heaps, this will be getting a lot of use from me for sure

    Works wonderfully on my system... windows XP pro 64bit
    Kaspersky found no viruses

    EDIT: Tried out the text integer method too and its works perfectly as well... fabulous work, thanks again
    Attached Images Attached Images  
    Last edited by Juz; 02-01-2010 at 07:21 AM.
    "I paint because I love to cut mats" (Arthur Alexander)

  2. #2
    Join Date
    Dec 2009
    Location
    Finland
    Posts
    42

    Thumbs up

    Nice work! I had a similar idea earlier. I wanted to create a palette like yours but based on given input image instead. You can find my initial code (Python, uses PIL) here. It just blurs the image, quantizes it and outputs the found colors in a grid of colors.

    Feel free to use the code if you want. It's still missing a smart way to sort the colors (some ideas) and I'm sure there are nicer ways to generate palette than the way I used. I expect a good algorithm would take image content in count better (ie. detect shapes and make sure colors of even smaller shapes are used well) but simple blur + quantize might do for now.

  3. #3
    Quote Originally Posted by bebraw View Post
    Nice work! I had a similar idea earlier. I wanted to create a palette like yours but based on given input image instead. You can find my initial code (Python, uses PIL) here. It just blurs the image, quantizes it and outputs the found colors in a grid of colors.

    Feel free to use the code if you want. It's still missing a smart way to sort the colors (some ideas) and I'm sure there are nicer ways to generate palette than the way I used. I expect a good algorithm would take image content in count better (ie. detect shapes and make sure colors of even smaller shapes are used well) but simple blur + quantize might do for now.
    Ooo , I'll look into adding that functionality, with your get_colors function. Dropping an image to the exe, and getting a custom palette should be nice =)
    I have absolutely no idea whatsoever how to automatically sort colors, though. It sounds rather complex. Maybe something linear would do , just to keep the palettes visually pleasing, like a hue sort.

  4. #4
    Join Date
    Dec 2009
    Location
    Finland
    Posts
    42
    YIQ sort seems visually pleasing to me. I wrote a simple example of how to do that. You can find it here. It uses colorsys module that's provided with Python. It might make sense to give grapefruit a go at some point considering it supports more color systems, though.

    There probably should be some sort of way to define which sorting method to use (spawn a simple UI on drop or just use some config file?).

  5. #5
    Ok this is the best I can do ..
    I've added the palette from image functionality from bebraw's code, and a sorting method, that I thought made more sense, both for .col and image files.

    The problem with arithmetic sorting is that with so few colors in an average picker, the first sorting priority is going to take over completely. The others won't play any significant role at all..

    So I've done a sort of 'SHL' sorting and grouping. First saturation to get rid of the grays, separating in 3 rough groups of saturation, then Hue, into 10 hue groups, and finally lightness. All values within the same group are considered equal for sorting. That way all the reds (for instance) are together, sorted by lightness, without minute hue differences taking over.

    Adding a gui would be overkill probably, so I've just included 2 exe's, for sorted and unsorted results. The sorting method is hardwired for now I'm afraid.. But you can always sort color swatches from within artrage.

  6. #6
    Join Date
    Dec 2009
    Location
    Finland
    Posts
    42

    Thumbs up

    Nice work! You are quick. This will be extremely useful utility.

  7. #7
    Join Date
    May 2009
    Location
    3438 ft above sea level
    Posts
    2,950
    Fantastic... having the two options is really helpful as there are times where i want to sort and other times when i want to maintain the order of the orignal .col.

    Just wanted to ask what image file types can be used for a palette generated from an image ?

    A huge thank you to both Azathothgr and Bebraw for your work on this great utility
    Last edited by Juz; 02-01-2010 at 09:17 AM.
    "I paint because I love to cut mats" (Arthur Alexander)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •