inkstitch / inkstitch

Ink/Stitch: an Inkscape extension for machine embroidery design
https://inkstitch.org
GNU General Public License v3.0
977 stars 172 forks source link

JEF: Invalid color numbers on machine #3137

Open Emeryth opened 2 months ago

Emeryth commented 2 months ago

I have started using a Janome MC500E embroidery machine and noticed that the color numbers displayed are wrong even when using a Janome (or equivalent) color palette in Inkstitch. It looks like the color numbers are always approximated from the RGB values.

Tested on Inkstich v3.1.0

Example: This is a design using Brothread 80 palette (which should be identical to Janome) The color numbers should be: 216, 001, 211, 201, 265, 002

colors

kaalleen commented 2 months ago

Do you have a file to play with?

Emeryth commented 2 months ago

I'm sorry, I can't post a file right now.

The simplest way to replicate it is to pick black and white. The black is assigned 002 properly, but the white will be assigned some other white shade like 220, instead of the proper 001.

It seems that most of the colors from Janome palette are converted properly, but the Brothread 80 palette (which should be equivalent) has different shades in inkscape and comes out wrong in the conversion.

On 15 August 2024 15:42:20 GMT+02:00, Kaalleen @.***> wrote:

Do you have a file to play with?

-- Reply to this email directly or view it on GitHub: https://github.com/inkstitch/inkstitch/issues/3137#issuecomment-2291290134 You are receiving this because you authored the thread.

Message ID: @.***>

kaalleen commented 2 months ago

Oh I see. I guess black and white are in every palette so Ink/Stitch will match it not necessarily to the palette you would it expect it to match to. You can apply a specific palette with Extensions > Ink/Stitch > Thread Color Management > Apply Palette and Ink/Stitch should respect your choice. Maybe you already did that though?

Emeryth commented 2 months ago

Yes, I tried Apply Palette already, same result.

I think the problem is with the JEF format writer itself, which assigns color numbers based on its own thread color table.

On 15 August 2024 17:17:56 GMT+02:00, Kaalleen @.***> wrote:

Oh I see. I guess black and white are in every palette so Ink/Stitch will match it not necessarily to the palette you would it expect it to match to. You can apply a specific palette with Extensions > Ink/Stitch > Thread Color Management > Apply Palette and Ink/Stitch should respect your choice. Maybe you already did that though?

-- Reply to this email directly or view it on GitHub: https://github.com/inkstitch/inkstitch/issues/3137#issuecomment-2291504704 You are receiving this because you authored the thread.

Message ID: @.***>

kaalleen commented 2 months ago

That is most possibly true. Here is the list: https://github.com/inkstitch/pyembroidery/blob/main/pyembroidery/EmbThreadJef.py

I think we should create a color palette from that list.

kaalleen commented 1 month ago

Would you be willing to prepare a pull request to add the jef palette?