Title: [FEATURE]: Add automatic contrast for secondary hover labels · Issue #8149 · plotly/plotly.js · GitHub
Open Graph Title: [FEATURE]: Add automatic contrast for secondary hover labels · Issue #8149 · plotly/plotly.js
X Title: [FEATURE]: Add automatic contrast for secondary hover labels · Issue #8149 · plotly/plotly.js
Description: Description Secondary hover labels inherit their text color from the trace color. However, light or low contrast trace colors can make the text difficult to read against the label background. I propose using Color.wcagContrast() with a 4...
Open Graph Description: Description Secondary hover labels inherit their text color from the trace color. However, light or low contrast trace colors can make the text difficult to read against the label background. I pro...
X Description: Description Secondary hover labels inherit their text color from the trace color. However, light or low contrast trace colors can make the text difficult to read against the label background. I pro...
Opengraph URL: https://github.com/plotly/plotly.js/issues/8149
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE]: Add automatic contrast for secondary hover labels","articleBody":"### Description\n\nSecondary hover labels inherit their text color from the trace color. However, light or low contrast trace colors can make the text difficult to read against the label background.\n\nI propose using `Color.wcagContrast()` with a 4.5:1 threshold to automatically select a more readable text color.\n\nRelated to #2342 and #8115 (see the review comment: https://github.com/plotly/plotly.js/pull/8115/changes/1926941923cda4b90e4258e9e48e8c9702543083#r4383215739).\n\n#### Before\n\u003cimg width=\"1104\" height=\"462\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/cbb5eaad-7d97-4d47-ae4b-97cc45a19aa3\" />\n\n#### After\n\u003cimg width=\"1104\" height=\"462\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d0e19cff-c61a-4715-8a1d-f18e3907881f\" />\n\n\n","author":{"url":"https://github.com/Lexachoc","@type":"Person","name":"Lexachoc"},"datePublished":"2026-10-27T17:45:24Z","url":"https://github.com/plotly/plotly.js/issues/8149"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:17fd4532-e598-8a3a-1cc3-b399b01f796b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B082:31E99C:2973F03:3756A67:6B01BBC0 |
| html-safe-nonce | e928e85b3035e84cf4570eb57587bd9138c8ddc28ef21106ef95b6b85388fcf8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDgyOjMxRTk5QzoyOTczRjAzOjM3NTZBNjc6NkIwMUJCQzAiLCJ2aXNpdG9yX2lkIjoiNzE4MDkzNTc3NDUxNzQ0MzUyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 10a4176d5180f4c1a3ce64a87354e2c59382b15b4e7ffb1fd894f64f953d7472 |
| hovercard-subject-tag | issue:6064642272 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/8149/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f611e8e0ed0b3a028e4385bdc81c23c966783c5151af75d7b503c7abbe02dff5/plotly/plotly.js/issues/8149 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f611e8e0ed0b3a028e4385bdc81c23c966783c5151af75d7b503c7abbe02dff5/plotly/plotly.js/issues/8149 |
| og:image:alt | Description Secondary hover labels inherit their text color from the trace color. However, light or low contrast trace colors can make the text difficult to read against the label background. I pro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lexachoc |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width