网格中行着色的合理或经过经验证明的标准?

发布于 2024-12-07 15:26:25 字数 480 浏览 3 评论 0原文

我正在编写一些代码来根据网格的内容对网格的行进行着色:网格中的每一行都是一个任务摘要,用户可以使用代表该消息的优先级/状态的不同颜色来标记每一行。

这里至少有 4 个变量:

  1. 未选择行时的背景颜色。
  2. 未选择行时的文本颜色。
  3. 选定行时的背景颜色。
  4. 选定行时的文本颜色。

例如,您可以为行的背景着色并使文本始终为黑色。或者将文本颜色更改为黑色或白色,以产生更高对比度的为准。或者您可以将背景保留为白色,仅将文本设置为彩色。选择一行时,您始终可以让所选行具有蓝色背景和白色文本(这样做的缺点是隐藏优先级/状态颜色,直到您选择不同的行),等等,等等。

是否有任何一种方法经经验证明比大多数其他方法更好?

人们是否发现了任何一般的经验法则,例如保持文本和背景颜色的高对比度?

任何人都可以向我指出对网格中的着色项目进行合理和/或深入研究的分析吗?

I'm writing some code to color the rows of a grid based on their contents: Each row in the grid is a task summary, and the user can tag each row with a different color representing that message's priority/status.

There are at least 4 variables here:

  1. A row's background color when it's not selected.
  2. A row's text color when it's not selected.
  3. A row's background color when it is selected.
  4. A row's text color when it is selected.

For example, you could color the background of a row and make the text always be black. Or change the text color to black or white, whichever creates higher contrast. Or you could leave the backgrounds white and make just the text colored. When selecting a row, you could always have the selected row have a blue background and white text (which has the drawback of hiding the priority/status color until you select a different row), etc., blah blah blah.

Has any one approach been shown empirically to be better than most others?

Are there any general rules of thumb here that people have discovered, e.g., keeping the text and background colors high contrast?

Can anyone point me to a well-reasoned and/or well-researched analysis of coloring items in a grid?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文