Change default icon color
Hello all,
Is it possible to change default icon colors of an object entry using the API ?
I don't see where this color is stored.

4 Replies
Hey @greg [iero] unfortunately not possible natively for the moment
Thanks @prastoin
It does not seems to be full random. Is it store somewhere ? Maybe I can change directly in DB
OK I get it, it is generated on the fly based on the record ID:
I store inks in the database and the generated color is not the same as the ink color 😄 Would be good if we could update,store and use the H value as un option
Record created
↓
record.id = "550e8400-..."
↓
<RecordChip placeholderColorSeed={record.id} />
↓
<Avatar placeholderColorSeed={record.id} />
↓
stringToHslColor(record.id, 75, 25)
↓
Compute hash → color
↓
"hsl(129, 75%, 25%)" generated
I store inks in the database and the generated color is not the same as the ink color 😄 Would be good if we could update,store and use the H value as un option
Hey, yeah indeed only companies doesnot follow the exact same pattern unless I'm mistaken
You should be able to find an
imageIdentifierFieldMetadataId in any object definition, we wanted to implement this at some point but we've never been able to prioritize itThere is a workaround. You can create a field avatarUrl (TEXT) with a custom url with the icon. Something as :
avatarUrl = "http://avatar-proxy:3000/avatar?hue=120&letter=J"
After it is simply a Service Node.js/Express which genere SVG on the fly.
I did not do it (yet) but it seems feasible