Conversation
README.md
Outdated
| - `color`: object | ||
| - `timestamp`: integer - server clock time in microseconds for when these colors are valid | ||
| - `background?`: integer[] | null - background color as `[R, G, B, A]` with values 0-255 | ||
| - `foreground?`: integer[] | null - foreground/text color as `[R, G, B, A]` with values 0-255 |
There was a problem hiding this comment.
Probably having RGB values for the foreground is a bit too custom for some UI clients?
What if we instead either have a boolean property is_dark? If its true the clients knows to use white text. If false it uses black instead.
Alternatively we could also have two backgrounds, one background_dark and one background_light so each client can decide by itself based on whether its in dark or light mode.
Or a mix of both? have two backgrounds and a boolean property that says whether the server would prefer the client to go into dark or light mode.
There was a problem hiding this comment.
I replaced foreground with is_dark boolean.
I don't know if we can easily generate a background for dark themes and light themes easily on the server side?
Adds a new color role to the spec. This allows the server to send RGBA color data to clients for various purposes. It specifies background, foreground, accent, a light color for use on dark backgrounds, and a dark color use on light backgrounds.