I've been transfering files between different OSes lately, as well as tried to browse those files via different network shares (mostly SMB and AFP), and what I'm still a bit confused about is which files contain info about tags assigned to files in macos. There's '.DS_Store', then there's '._filename' with both taking 4KB, and then there's .AppleDouble folder that contains around 700bytes files identical to filename they refer to. It feels like managing files using different protocols leaves different files (i.e tag assigned via SMB share doesn't show up when the same folder is accessed via AFP and vice versa, although "Get info" in macos still shows both). Anyway, which files would be safe to delete withough accidentally deleting all the tags?
EDIT: After playing around some more it looks like '._filename' files are responsible for keeping tag info. There are 2 files in .AppleDouble though: '._filename' and 'filename'. Removing non-hidden one makes colored dot not show up in Finder (file will still be searchable by tag, tag will show up in "Get info" and if it's in your context menu it will be shown as already selected, and you will be offered to remove it), while the '._' one doesn't seem to do anything.
EDIT2: Ok, I'm not sure, but it looks like local macos drives (I'm assuming HFS and APFS only) and SMB shares look for metadata in the DS_Store files, while AFP share looks for '._' files and .AppleDouble Folder. Also, while deleting .AppleDouble only stops colored circle from displaying and openning the file will create the needed file again, circle still won't show up. It's quite unfortunate that there's no obvious way to recover .AppleDouble files even though actuall info seems to be stored in "._" files.