Feature request: embedding gamut preference in the save file

I have two different workstations, one at work and one at home.
For the most part saving my work functions really well, I can easily continue.
This is however not the case when I’m working in a limited pallette using gamut masks and the artistic color selector.
The result is that I need to write down how I have it set up or make an approximation.
Could it maybe be made so that this information is stored in save files?

1 Like

That is an interesting question for sure.

For the case of the advanced colour selector I think you need to bring in the gamut mask file for that work as a separate file.

In the case of pigmento you just need to load a couple of values. But I don’t think you can embed those values anywhere in the save file to be loaded back up. I just have been using the kritarc file. It would be cool to be able too somehow.

Can you elaborate a bit on how you do that?
There may be something useful in there for me

Also, you mention the advanced color selector but afaik there’s no way to impose a gamut mask on it, hence why I use the artistic color selector for limited pallettes.

Annotations allows that.
BuliNote use it to embed extra data in a krita file

Using annotation ensure that your Kra file is still valid.
After, annotations are ignored on system on which plugin that wrote it is not installed to read and exploit them.
But, even if document is modified, Krita will keep safely the existing annotation, even if plugin is not installed/activated.



well for the advanced color selector if you make one of these files, I think they are just an SVG file

you can add one for the file you made but it will have to loaded is seperate. if you catalog them well i am sure you can handle that.

you can unzip the files and edit thing inside and close them up again I think. I saw the svg inside right now.

I saw that name floating around but I did not know what it was I am gonna check it out then, i am curious now.

That’s amazing, now I can at least add it in a note within the file which is the next best thing

I don’t know :slight_smile:
I mean, I don’t know anything about gamut and other stuff, neither if they can be exported/imported.

What I said is, if something is possible to be exported/imported, it can be embedded through a plugin in document annotations like BuliNote does :slight_smile:


I mean I can add it in a note from the bullinote plugin, you know, in typed or written text.
However, I did encounter some issues with the plugin, maybe it wasn’t updated in a while?
I can make a new note but editing isn’t possible, I get a script error when trying…

for me i just need to save values like this and I can reimport everything right:


And for other things too like the palette for saved colors too.

I was reading the instructions but I feel I am lacking some fundamental knowledge to understand what it means exactly.

That’s not normal :confused:

Can you in Buli Notes topic add a comment and provide information about your environment (OS, Krita version), precision about error message, and if possible screenshots and exact procedure you apply to produce the error message?



Sure, I would point out though that I’m working in the 5.0 beta, so maybe that is of influence on the plugin behavior?

An example

from krita import *
import re


print('================================================= EXAMPLE 1 =================================================')

doc = Krita.instance().createDocument(300, 300, "Test", "RGBA", "U8", "", 300.0)


doc.setAnnotation('my_plugin_reference_annotation_key1', "my annotation description", QByteArray(data1.encode()))

for annotation in doc.annotationTypes():
    if re.match('my_plugin_reference_annotation_key\d+', annotation):
        print("Description: ", doc.annotationDescription(annotation))


# or if you prefer to have one key per data for example:
print('================================================= EXAMPLE 2 =================================================')

doc = Krita.instance().createDocument(300, 300, "Test", "RGBA", "U8", "", 300.0)

for item in items:
    if r:=re.match("gam_([^=]+)=", item):
        doc.setAnnotation(f'my_plugin_reference_annotation_key_{r.groups()[0]}', f"my annotation description ({r.groups()[0]})", QByteArray(item.encode()))

for annotation in doc.annotationTypes():
    if re.match('my_plugin_reference_annotation_key.+', annotation):
        print("Description: ", doc.annotationDescription(annotation))
        print(f"Content: '{bytes(ba).decode()}'\n")


but be aware that currently, there’s a bug with annotation system

It’s possible to work with it, but in some specific situation, data can be lost.


No normally not
Plugin has mainly been developed with Krita 5-alpha, and on my side it works on Krita 5-beta 1

So there’s might be a case I didn’t think about and that generate the script error on your side


Posted in the Buli thread, script error text/code included.

@Grum999 it is there in the file :exploding_head:

I think it is done I just need to clean up and stuff but here is the demo.
It detects a active document change and then loads the annotations if it is the case.
Thank you @Grum999