It is the same response of chatGPT.
Sorry, but I need the exact color of the Sculpt Face sets.
There are a lot of combination, for now I found the algorithm that generate the random seed, but the result is an int number, the most problably solution is that there is a list of color somewere.
As far as I can tell, this is not currently possible.
You can get the index, as you have already done, but it looks like the color is randomly assigned in C code, as you’ve said:
/* Returns the Face Set random color for rendering in the overlay given its ID and a color seed. */
#define GOLDEN_RATIO_CONJUGATE 0.618033988749895f
void BKE_paint_face_set_overlay_color_get(const int face_set, const int seed, uchar r_color[4])
{
float rgba[4];
float random_mod_hue = GOLDEN_RATIO_CONJUGATE * (face_set + (seed % 10));
random_mod_hue = random_mod_hue - floorf(random_mod_hue);
const float random_mod_sat = BLI_hash_int_01(face_set + seed + 1);
const float random_mod_val = BLI_hash_int_01(face_set + seed + 2);
hsv_to_rgb(random_mod_hue,
0.6f + (random_mod_sat * 0.25f),
1.0f - (random_mod_val * 0.35f),
&rgba[0],
&rgba[1],
&rgba[2]);
rgba_float_to_uchar(r_color, rgba);
}
It looks to me like it’s setting a 4 Vector float (RGBA) and then additional floats for randomizing hue, saturation and value.