My Profile Photo

Sheogorath's Blog

Depending on the time of the day a friend, a colleague, a wise guy. The beauty of the world is its sense of humor to show humans their way by letting them search their own.

Cover image for this blog post

Calculate MXID colours

Today I learned that the colour for names in the Matrix client “Element” is calculated using an array of 8 pre-defined colour codes and a simple hash algorithm that distributes the colours a bit, based on the MXID.

I came across this due to a discussion in “Bloggers Gathering”, a matrix room I provide, where people discussed where the different colours for the users come from and cadence shared their page which can pre-calculate the colour for your MXID.