Inkscape.org
Beginners' Questions Is there a way to select objects with similar but not exact same color?
  1. #1
    MrSin MrSin @MrSin

    I'm working on this lowpoly picture of my dog and would like to turn it into a stencil for print. as you can see, there is a lot of triangles that are similar shades but not exact. Is there a way to select images within a range. it would make my job soo much easier if i could choose a range of the colours in my document or even if it would be possible to find specific objects with the colours listed in the document resources. Any tips would be greatly appreciated

    Menio Help
  2. #2
    David248 David248 @David248
    *

    That's an interesting question. Unfortunately I have no precise answer to provide. Your screenshot says there are #600 objects, and looking at the scrollbar of the Documents resources, there is a chance there are  as many colors.

    I'd try to save a copy of your work and try to simplify things by selecting all and remove the red color chanel (Extensions > Color / remove Red channel), then see on Documents resources panel if you can discriminate colors by their hex values : the idea is to use Find/Replace panel to select the colors that begin by the same characters for their fill values. In your screenshot, if you type in search bar #181, select Search in : properties, you select at least 4 objects. You just have to give them a new fill color (then they can be reselected by using Select same), or save this selection using Selectors and css panel.

    Another way would be to work on the bitmap of your dog in gimp to simplify colors (indexed colors) before doing lowpoly artwork.

  3. #3
    inklinea inklinea @inklinea⛰️
    🆒🆒🆒🆒

    My extension selection plus does this. It has select by colour distance. 

    Sadly it works on Inkscape 1.2 and not 1.3, until I get time to fix it.

  4. #4
    Polygon Polygon @Polygon🌶

    What I would try: If you select several shapes with different colors, Inkscape can interpolate the average value of the colors and display it at the bottom of the color settings. If the individual parts don't matter, I would first select one color and then all the same ones to combine them via Path->Combine. Then select another similar color and note the average value. Now select all the same ones again with the previous one and combine the shapes with Path->Combine. Then transfer the noted middle color value of the fill color. And so on and so forth.

  5. #5
    Tyler Durden Tyler Durden @TylerDurden
    👍👍

    I'd select all the paths and Alt-B to make a bitmap copy. Then use Trace Bitmap>Multicolor>, Colors, 20 scans or so. The results will need cleanups.

  6. #6
    Paddy_CAD Paddy_CAD @Paddy_CAD
    👍

    Maybe you can use [Extensions > Colour > Black and White...]. Set a threshold and move lighter shapes to white and darker shapes to grey. Repeat for a few different levels and colourise the selections later.

  7. #7
    MrSin MrSin @MrSin

    Thanks @TylerDurden and @Devid248. the alt-b version worked well for my purposes. i chose 20 scans and then i chose the original paths that corresponded with the bitmap created paths. Some extra manual work made it possible to reduce those colours to 10. The rest of my work will be have to be done in meatspace. I was abouyt to do what @Polygon suggested but seeing as there were about 500 different colours would have taken ages. I'll have to pay attention for if/when @inklinea has made Selection Plus available for 1.3. There has been so many times that tool would have been useful.

  8. #8
    Polygon Polygon @Polygon🌶
    MrSin

    I was abouyt to do what @Polygon suggested but seeing as there were about 500 different colours would have taken ages

    How do you scan for 500 colours? I thought 256 is the limit.

  9. #9
    MrSin MrSin @MrSin
    Polygon

    How do you scan for 500 colours? I thought 256 is the limit.                       Format   Source

    I'm no expert but from what I understand 256 is the max with the 8bit palette. Inkscape uses hex colors (i think, they might use something else and translate it to hex, I have no idea how the tech work) which is 32 bit giving it 16,777,216 different possible colours.

  10. #10
    MrSin MrSin @MrSin
    Polygon

    How do you scan for 500 colours? I thought 256 is the limit.                       Format   Source

    I'm no expert but from what I understand 256 is the max with the 8bit palette. Inkscape uses hex colors (i think, they might use something else and translate it to hex, I have no idea how the tech work) which is 32 bit giving it 16,777,216 different possible colours.

  11. #11
    Polygon Polygon @Polygon🌶

    Inkscape scans for max 256 colours. Has nothing to do with HEX color values nor bit depth. The amount of elements in your first screenshot may result from a different app where you got the low-poly version from - but I doubt there are more than 28 used colours in the file. That´s why my advice from reply#4 is still valid:

  12. #12
    MrSin MrSin @MrSin
    Polygon

    Inkscape scans for max 256 colours. Has nothing to do with HEX color values nor bit depth. The amount of elements in your first screenshot may result from a different app where you got the low-poly version from - but I doubt there are more than 28 used colours in the file. That´s why my advice from reply#4 is still valid:

    The way i had gotten the lowpoly picture was taking a photo of my dog and making paths made solely of triangles, each triangle its own path. the colors were made by using color picker from the area of the triangle on the original photo. This meant i had ended up with a picture consisting of 630 paths in 602 different colours (those are the literal numbers). This wasn't a problem with my original use for the image but when I thought of turning it into a stencil the problem became immediately apparent. the reason why it looks like its only 23'ish colours is because a lot of the colours are near-but-not-exactly the same. take #050505 and #060504 for examle. having a way to at least grouping the similarly coloured paths made the job immensly faster. I made a bitmap copy of the alt+b image and turned each of those paths bright green. Then I could choose which triangles overlapped with each of the bright green layers and group them into something usable

    Lowpoly Menio2
Inkscape Inkscape.org Inkscape Forum Beginners' Questions Is there a way to select objects with similar but not exact same color?