See this thread and especially my post in this thread.
If I remember correctly, star ratings should work quite well, but for color flags there is only limited compatibility (e.g. I’m sure that for some colors, if you set them in digikam, they will show up in darktable). The issue is that digikam and darktable have different concepts about color flags, e.g. darktable allows for multiple colors to be set at the same time and the set of supported colors is different.