You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assign the --user-color-* CSS variables which allows referencing the chosen color of a specific player or the current user in CSS in a way that is resilient to later color changes.
#9771
Closed
mouse0270 opened this issue
Jul 16, 2023
· 1 comment
When a player logins in create and set a custom css variable based on that player's color selection, when the player updates their color, update the css variable to match.
Why is this important?
Well, its not, but also, from what I can tell, player color doesn't do much already, this would allow developers to integrate this in a way that keeps it consistent.
How would it work?
My idea is that you could create a css variable that is formatted like --player-color-PlayerID. For example, at least in the D&D5e System player color is used to theme the border of chat messages by doing border-color: CURRENT_PLAYER_COLOR;. however this is static, if the player changes their color later, or in another session, it still their old color.
But having a css variable attached to a player, you could do something like this: border-color: var(--player-color-1eYC0irr8ZBrzXfK, CURRENT_PLAYER_COLOR);. This would use the players color and even update as they change it, and if they were missing, it would use their initial color.
Bonus Points if you save the player color and css variable even if that player isn't logged in so that it still just works until they change it again
Why do I want this?
Well honestly, I was working on a character sheet, and sort of implemented this exact mechanic because I thought it would give the sheets some more color by using the players color in the sheet design. The players can make things feel more like their own. In my example, the header and some elements are styled using the players chosen color
Whelp, this is my useless feature request... Honestly could care less if your just like, naw and close this ticket, just thought it would be a fun way for UI nerds like me to make modules using the players colors to make it feel more unique.
To be clear, this feature request is completely useless all it does is provide something that no one but me might ever actually use. haha
The text was updated successfully, but these errors were encountered:
aaclayton
changed the title
Provide Access to Player Colors via CSS variables
Assign the --user-color-* CSS variables which allows referencing the chosen color of a specific player or the current user in CSS in a way that is resilient to later color changes.
May 17, 2024
aaclayton
changed the title
Assign the --user-color-* CSS variables which allows referencing the chosen color of a specific player or the current user in CSS in a way that is resilient to later color changes.
Assign the --user-color-* CSS variables which allows referencing the chosen color of a specific player or the current user in CSS in a way that is resilient to later color changes.
May 17, 2024
User Experience
When a player logins in create and set a custom css variable based on that player's color selection, when the player updates their color, update the css variable to match.
Why is this important?
Well, its not, but also, from what I can tell, player color doesn't do much already, this would allow developers to integrate this in a way that keeps it consistent.
How would it work?
My idea is that you could create a css variable that is formatted like
--player-color-PlayerID
. For example, at least in the D&D5e System player color is used to theme the border of chat messages by doingborder-color: CURRENT_PLAYER_COLOR;
. however this is static, if the player changes their color later, or in another session, it still their old color.But having a css variable attached to a player, you could do something like this:
border-color: var(--player-color-1eYC0irr8ZBrzXfK, CURRENT_PLAYER_COLOR);
. This would use the players color and even update as they change it, and if they were missing, it would use their initial color.Bonus Points if you save the player color and css variable even if that player isn't logged in so that it still just works until they change it again
Why do I want this?
Well honestly, I was working on a character sheet, and sort of implemented this exact mechanic because I thought it would give the sheets some more color by using the players color in the sheet design. The players can make things feel more like their own. In my example, the header and some elements are styled using the players chosen color
Whelp, this is my useless feature request... Honestly could care less if your just like, naw and close this ticket, just thought it would be a fun way for UI nerds like me to make modules using the players colors to make it feel more unique.
To be clear, this feature request is completely useless all it does is provide something that no one but me might ever actually use. haha
The text was updated successfully, but these errors were encountered: