Anyone know how to create a random color hex code? Preferably unique to the tableโฆ
@Grant_Stead I think this will work in excel/sheets:
=DEC2HEX(RANDBETWEEN(0, 256^3), 6)
Might be a good starting place.
@Grant_Stead How are you using random colors?
In case anyone stumbles on this, hereโs what I did. Iโve got appsheet dropping in an initial RANDBETWEEN(0, 16777215) so that it stays fixedโฆ Then Iโve got an array formula on the google sheets side to convert it to HEX color code. =ARRAYFORMULA(IF(ROW(AN1:AN)=1,โpeople_hex_colorโ, IF(ISBLANK(AN1:AN),DEC2HEX(AN1:AN, 6))))
@tony @Grant_Stead Should be: =DEC2HEX(RANDBETWEEN(0, 256^3 - 1), 6) Since =DEC2HEX(256^3, 6) is invalid (extremely unlikely to happen)
@Gil_Littman_AppSheet is there an option on the appsheet side?
@Grant_Stead Not as far as I know.
@Gil_Littman_AppSheet Thanks!
@Stephen_Mattison So, long story short. With thisโฆ imgplaceholder.com - ImgPlaceholder.com
I can make custom icons, by building a concatenated URL. This also gives me the ability to have unique colors for each person, that way if they make comments, etc. You can tell whom it is at a glance. ImgPlaceholder.com imgplaceholder.com
@Grant_Stead Nice work, me likey! TY!
@Gil_Littman_AppSheet Why the -1?
@Gil_Littman_AppSheet Nevermindโฆ I get it LOLโฆ 256 of each red/green/blueโฆ starting at 0 not 1โฆ bang.
@Grant_Stead How about
"https://ui-avatars.com/api/?background=" & RANDBETWEEN(000000,999999) & "&name=" & ENCODEURL([UserName])
User | Count |
---|---|
16 | |
10 | |
10 | |
8 | |
3 |