Jump to content

Finding millions of colors that does or does not exist - G'MIC QT Tutorial


Recommended Posts

How to find millions of colors that does not or does not exist with the usage of Color Existence Distribution - [RGB8] G'MIC-QT filter.

Note - Useful for applications that requires you to find non-existent colors. This isn't really a tutorial for creativity, but more so for image-analysis for anyone that needs this.


For existing colors, you may want to type in colormap 0 in code filters found in Various section of G'MIC QT unless you'd like to see distribution of existing colors in a way that's easier to understand.



1. Paint.NET 4.2.x

2. G'MIC QT 2.7.2



The Color Existence Distribution Filter does not take into account of Alpha Channel. It would require users to create a image on 65,536 x 65,536 and as far as I know, that's going to be CPU intensive. So, I will not make it take into account of Alpha Channel.


Tutorial Steps

Step 1) Open a image. Preferably one with many colors in it for starters. For starters, start with a jpeg photograph.



Step 2) Resize Canvas Size to 4096x4096. If it ends with a white background, you need to do it on a duplicate and erase the older layer after doing this.

Image Anchor can be anywhere.




Note - 4096x4096 can hold 256^3 colors.



3) Pick a color within the image. (I wish I can screenshot the cursor to demonstrate this)

4) Add new layer and put the layer below the image. Your layer structure should look like this.




5) Fill the Empty Layer with the existing color of the image.

6) Flatten Image.

7) If you followed instruction correctly, your Paint.NET interface should look something like this:



4096 squared dimension? Check. All canvas filled? Check. One Layer? Check.


6) Open G'MIC QT under Effect->Advanced->G'MIC-QT

7) Click on Search above Available filters and type in Color Existence, then click on it.



Note - Don't worry about empty or filled preview. You are likely using a image that takes a very small percentage of the possible 256^3 colors.

8 ) If you'd like to find existing colors in a distribution table, use Existing Colors, otherwise, use nonexisting colors. I'll pick existing colors.

9) Your result should look like this after 5-6 seconds. (I used a different image, one with a greater range of colors to demonstrate)



Note the speckle of colors after you zoomed in


How to read the information generated by the filter?

1) Blue Color Increments start from left to right, and each 16 colors are incremented from top to bottom. This means that 0 Blue is on top left, and 255 Blue is on bottom right.

2) Left to Right within each blue square contains 0-255 Red Gradients.

3) Top to Bottom within each blue square contains 0-255 Green Gradient.


A sample image that contains all 256^3 colors - https://pixls-discuss.s3.dualstack.us-east-1.amazonaws.com/original/3X/5/e/5e0f6e8983b2f5f7d5c99d40dcebb3f9bd73f091.png

provided by @G'MIC


Further information filtering - You can utilize Gravity plugin for Paint.NET. That way, you can be assured that you're not clicking on transparent area.

- EDIT as of 1/30/2020 for further information filter:  You can also use Grouped Pixels Axis-Based Shift filter within G'MIC-QT plugin. This option is reasonably fast, and you can place pixels into the center of image.

Edited by Reptillian
More editing.
  • Like 1

G'MIC Filter Developer

Link to comment
Share on other sites

2 hours ago, Sakana Oji said:

I cannot think why you didn't provide us with screenshots before


The reason why I didn't provide you screenshot earlier is that it was part of the filter development. I had posted the thread in order to generate the link as the link isn't as simple as URL one can make to direct to this thread once ready. There is a number on the URL, and that's not something I can guess. After the link is generated, I posted it into the g'mic filter I have made so that users can read this tutorial when the filter gets ready. You can click on the link provided by the filter, and then you'll see that it gets you to this thread.

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

  • 1 month later...
On 11/18/2019 at 11:16 PM, healthfreak said:

Thanks for sharing this tutorial.

A little late to respond, but you're welcome. This reminds me to add more detail. Information can be filtered even further with the usage of MadJik Gravity plugin.

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

Now that Grouped Pixels Axis-Based Shift  G'MIC filter has been updated, and with no bugs or negligible bugs count, you can use this filter to place pixels right in the center. The speed of that filter has improved so much to usability in context of this tutorial. This note has been added.

Edited by Reptillian

G'MIC Filter Developer

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...