Hi Blastar!

The NGFX tools kick ass!

One small observation is that "Palette > Save as" the window prompt that opens says "Open" when it should say "Save"...The functionality works perfectly just saying...

Now on to the big questions.....

Seen below is your typical NGFX GUI as a reference point.

tromb Fichier joint : uYoS

Often when I import an image I will need to use the drag and drop feature to match the palette of the imported image to the palette I have loaded in NGFX.
1. By adjusting the the drag and drop to be vertical and a little larger it would be much easier to do manual palette matching. (It is small now and you are comparing vertical to horizontal all the time)
2. A feature called "Match to Current Palette" if checked the palette in your imported image would shuffle to best match the palette that is currently loaded in NGFX.

If you look at my example you could A) Manually drag and drop palette entries or B) Just check "Match to Current Palette" and the computer would do its best to line up palette entries using the current NGFX palette as the reference.

See a mockup for a better visualization of feature requests.

tromb Fichier joint : h6El

Thanks a million for creating this great tool! king
done! smile

thanks for compliment and creating a mockup - this helped a lot!
- open/save-typo fixed
- palette is now vertical
- new option: match current palette

download here

the new 'match current palette'-option replaces the actual color with the closest color from current palette, I hope this works like expected.

when importing a photo using standard-palette it creates stylish retro-art, cga-like! fou
Hi Blastar

This is wicked! Thanks so much for making the change and enhancing the functionality! rotfl
My goal is to make a project that you would be proud of and actually get to see! top (I am in a good spot I do not think we are talking about a pipe dream here)

I got a slam dunk! As soon as I loaded the image with the disorganized palette entries the match feature lined the disorganized palette entries up.

tromb Fichier joint : aZpI

I noticed when I turned off "Match to Current Palette" several of my Palette entries disappeared....

tromb Fichier joint : VnEa

Now bottom line you went above and beyond and I couldn't be more happy but...If the functionality worked like...

1) "Match to Current Palette" (Neatly organizes entries to match the current palette that is loaded....more times than not this will be all you need)
2) If you toggle "Match to Current Palette" OFF the reorganized palette entries remain exactly where they are but the bad ass "drag and drop" feature is re-enabled to give you an additional layer of control.

With the technique described above you could combine the two features to get a specific result.

From an aesthetic point of view you could align the buttons if you felt so inclined.... just saying

1) Way one is no hassle.

tromb Fichier joint : VefD

2) Way two requires the font of the "Palette - sort by Drag & Drop" to be adjusted.

tromb Fichier joint : mDm4
I noticed when I turned off "Match to Current Palette" several of my Palette entries disappeared....
that's correct, if you uncheck the 'match..'-option the palette will be recreated. when you modify the 'matched' palette you will also change the current palette... because of this I disabled the drag'n'drop-feature.

I think you need this for some kind of color-swaps!?
Hi Blastar,

Ideally both of these scenarios would produce the same result.

1) "Drag and Drop" gives the desired result. Please see annotation in the image.

tromb Fichier joint : OWyq

2) "Match to Current Colour Palette" does not give the desired result. Please see annotation in the image.

tromb Fichier joint : he0q

I am starting to see that you are creating a new palette. Although very cool I do not need to import images with an incorrect number of colours or generate palettes for images based on the NGFX palette.

I am looking for an alternative to "sort by drag and drop" to help automate the process of sorting an imported image's colour placements to match the NGFX palette.

I guess maybe a more proper title might be...
"Auto Sort Palette (Best Guess)".....I am very sorry Blastar I used a poor choice of words when describing the feature initially.

This feature would be a great start then the "sort by drag and drop" could be used for clean up / discrepancies.
If the program mismatched the palette orders I could then resort to "sorting by dragging and dropping" palette entries to correct the issue.

Typical Process Flow

1) Create an image 15 colours + knockout (external application)

2) Import the image into NGFX. Usually I organize the like colours to appear as a gradient with "sort by drag and drop" so it is easier for me in the future.
(The above colour order in the images has this gradient thing I speak of)

3) Test the rom. Oh snap! I made a mistake!!!! EX: Graphics alignment is off. Frame does not animate smoothly etc...

4) Edit the image (external application)

5) Re-import the image overtop of the old image that was previously imported.

(This would be the first image above because I am importing over the same gfx for the purpose of making a small variation) Now I need to use "sort by drag and drop" again to ensure my palette matches the palette I have loaded in NGFX because I previously grouped like colours together as gradients.

(Remember before today I was using the horizontal small entries to get the job done...I needed a technique to group the colours to keep things square in my mind...there is also another angle to this method described below)

6) Rinse and repeat over and over until the GFX are just right.

If you are following this post you may say to yourself...Man! This guy is just basically reloading the same image over and over again until he get's it right!
(You would be right that is gist of what I am describing above)

If you are following this post you may say to yourself...Man! This guy is creating work for himself! If he never bothered with using his "gradient" method he would be better off! He is upsetting the natural order of the colours in his image's palette! If he never reorganized his palette in the first place he could just re-import his image over and over again with no need to reorganize his palettes on every import!

(This is true! Why bother reordering the palette entries at all? The reason is the rom has gfx in very interesting places. Sometimes you can replace a large chunk of gfx and in that case you may have all 15 of your colours present. Sometimes you are isolating a small piece of a graphic and replacing that with a small image. In that case the image you import may only have 5 of the 15 colours loaded in NGFX leaving 10 blank spaces.

EX: If you organized all the yellows together you will be able to see the progression between your light to dark yellow's and will easily be able to align one of your 5 palette entries into the right slot opposed to having your yellows scattered throughout the 15 slots. It is much easier to misplace a colour if your colours are not organized...I have gone down this road many times)

Please check again: download here

- Calculation of color-distance is now done via Euclidean distance, this should work better with sprites.
- I also changed the 'Match..'-option, I believe a Button works better than a Checkbox.
- Palette Drag'n'Drop is now always enabled.
- Only used colors from 'current palette' will by copied to import-window... BUT all colors (also empty entries) will be copied back! <- I'm not sure about this!
Hi Blastar!

Thanks so much for listening to my ramblings and for taking the time to incorporate these new features!

My findings....

Scenario 1: All colours in the imported image match the NGFX palette

The image you import has the exact same 15 colour palette as your NGFX palette. "Match to current Palette" seems to work perfectly!
I have not tested extensively but as it stands I cannot see any degradation to the imported image!!!
Side Note: More often than not this will be the ideal way I work. "Match to current Palette" will definitely help stream line the process! THANK YOU! Blastar!

Scenario 2: All colours in the imported image match the NGFX palette

The image you import matches the colours in your NGFX palette but only contains a fraction of the 15 colors.
"Match to current Palette" identifies the exact matches and leaves the other entries as blank entries.
Very useful because the imported image will have the correct sort upon import.
Side Note: This is a very common occurrence that is forced on you from time to time. This is the jigsaw aspect of what we are up to.
"Match to current Palette" will definitely help stream line the process! THANKS AGAIN! Blastar!

Scenario 3: Some colours in the imported image match the NGFX palette

The image you import has some of the colours in your NGFX palette as well as a few others.
Side Note: This can happen...generally operating in the space of Scenario 1 and 2 is ideal but accidental colours sneak in from time to time. Random GFX edits, colour tweaks etc..
These colours are not noticeable to the naked eye but are indeed different than the NGFX palette.

I purposely adjusted one colour in an image not to match the NGFX palette to replicate this scenario. I then imported the image.
"Match to current Palette" identifies the exact matches and leaves the other entry that did not match as blank. Good so far...
Upon importing the image the new palette with the blank entry was imported into NGFX. Good so far...
I figured all I need to do is load the previous palette and the blank palette entry will be corrected. I did load the previous palette and the proper colour was loaded into the blank spot. Good so far...
Upon reviewing the graphic, the colour that was loaded in from the new palette was not inserted into the graphic! This is is where things fall apart.

If the blank palette entry still represented the colour that did not match it would just be a simple palette load to remedy the problem.
Better yet instead of putting blank entries when a palette entry does not match it would be ideal if the entries that don't match still remain in the import window's colour list.
At this stage "sort palette by drag and drop" could be used to better organize the palette entries that are not recognized as matching.

I realize you have purposely made it very obvious to users what colours match and the blanks represent how many colour's don't.
In my case I always need all colours that I am importing so blanking out colours and assigning new designations does not help me.
This is why I was always big on the "sort by drag and drop" being enabled because of situations like these.
*Ideally if 1 or more colours do not match the user still has access to the non-matching colours and can manually correct the sort order before the import is processed.

If you were to tackle this issue a suggestion would be to give the unmatched colours a light red outline to help the user implicate the discrepancies.
Alternatively, if the outline does not exist the user will still be able to compare the NGFX palette against the import palette visually so the identifier is not the biggest deal.

**Edit - Here is an example of a highlight of some obvious unmatched colours...Typically the unmatched colours wouldn't be as obvious because they would generally be slightly different shades of the existing NGFX palette but this is just a quick visualization to demonstrate what an outline might look like...1 pixel black, 1 pixel red, 1 pixel black - If done in this way black and reds would still read clearly as unmatched.

tromb Fichier joint : gec7

Scenario 3 is fixable....but it would be really slick if the process described below could be avoided with process described above.

1) Cancel an import as soon as you notice there are blank palette entries generated by "Match to current Palette"
2) Re-import the same image but use the manual method "sort palette by drag and drop"
3) Upon import save the newly imported palette and use it moving forward.


There you have it! Blastar has done some really cool feature enhancements and you have all 3 described scenarios covered. Is there more to this story? Only time will tell. Many thanks Blastar for the Awesome NGFX Tool set!
You are making dreams come true! classe
good job
Hi Blastar!

After gaining more experience with NGFX I have found a repetitive task I was hoping you might consider incorporating into the program.

Steps used to identify a palette

1. To identify palettes I always manually draw a single vertical strip that matches the exact palette order. (I must carefully plot every palette entry on a tile)

In the Emulator
2. I take screenshot when the modified tile appears.

In Photoshop
3. I blow up the screenshot and can clearly see the exact order of the palette colours.

Feature Request

"Line Palette Tool" (for lack of a better description)

The tool would reduce step 1. of the case described above to a single click.
The idea is.....

sorry, but i can't understand your question. you draw the colors 0-15 to identify the matching palette entry? there are easier ways.
1. use the dropper tool.
2. press the CTRL key while clicking on a pixel (left or right) to get the matching palette entry (instant dropper - psp-feature, not documented)
Hi Blastar,

Thanks for the tip it is cool that you have that feature!

In this case I am using the technique to replace the original palette of any sprite with my own custom palette.

1. I must draw the colours vertically 0-15 in NGFX.
2. Save the c files.
3. Launch the game in an emulator.
4. Play the game until the tile with my 0-15 strip appears.
5. Take a screenshot of the scene with the tile in it.
6. Blow the screenshot up in photoshop so the 0-15 pixels are enlarged so I can clearly see the order of the colours in the original palette. Now I know exactly what palette I am replacing and I can track it down.

At this stage I have drawn countless 0-15 vertical strips hoping a macro of sorts could be added to NGFX.
oh, now I understand the idea behind it.
I didn't intend to add more complicated graphics functions, it's out of proportion to the use. if it helps I can adjust the fill function so that you can switch between full-color (opaque) and different gradients.
but that takes a few days because I am very busy with other things.
I really appreciate the help but if you are busy I don't want to put you out. I only need the feature for the strips. I can continue drawing them. Just thought I would share my current work flow.

Since I have your attention I wanted to see if you might consider incorperating a tile bookmark feature? If someone is working exclusively on a particular rom they are able document the rom by bookmarking important tiles.

Player 1 Idle tiles
Player 1 super move tiles
Level 1 Boss tiles

People could make an archive of


After loading the file in NGFX the user could use a drop down menu to select tile entries that were saved in the .txt file.

This will be helpful for people wishing to revisit the game in the future as well as for people that are constanley returning to the same set of tiles to modify them.

You do not need to make the bookmark.txt files from NGFX you just have to provide a format and people can make their own .txt files manually and load them in to NGFX to be inteurpted.

This would be sweet...just a suggestion thanks for hearing me out.