question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Displaying custom data on hover for RGBA image

See original GitHub issue

It would be nice to be possible to show some sort of information on RGBA images using Bokeh (https://stackoverflow.com/questions/54753032/hover-image-rgba-bokeh/54753614#54753614). For instance, I’m working on a project in which we provide an RGBA image where the alpha represents some sort of confidence. We would like, when hovering an image pixel, to be able to show this confidence (in this case, the rgba[:,:,3] value).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
maximltcommented, Oct 25, 2022

As can be seen in the Bokeh 2.4.3 docs hovering over an RGBA image shows the 32-bit RGBA int value. image

It seems like a better default would be to display the RGBA tuple, as asked on Discourse (we also get this request on hvPlot/HoloViews).

I’m writing first in this old issue to make sure that it should not be re-opened, I’m not entirely sure the PR that closed it effectively fulfilled the original request. Happy to open a new feature request otherwise, if it’s a good idea!

0reactions
bryevdvcommented, Oct 25, 2022

My original (offhand) proposal was to expose new special fields $red, $green, $blue and $alpha that users could use to extract color sub-components from any value. This approach:

  • would work for any color column, whether it is used for ImagRGBA or not
  • affords a simple mechanism for users to arrange the components exactly how they want (e.g in a tuple in one line? Or separate rows for every channel) without inventing some baroque color-formatting DSL
  • Is immediately understandable by anyone who already knows what RGBA channels are (i.e. everyone who would want to be able to)
  • works well with existing formatters: want hex values? No problem, used “printf” format with $red, done!

I still (personally) think this is the bst option that trades a minuscule amount of verbosity for 1) much more flexibility for users, 2) much less maintenance burden for developers. We can cerainly continue to debate/discuss that further but at this point I really must insist on a fresh issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover div rgba with a background image without changing ...
I need css code of mouse hover like When you hover the image it will show border color of 1px and over color...
Read more >
Image Hover Text Overlay Effect with HTML & CSS - YouTube
View the Code and CodePen:https://dcode.domenade.com/tutorials/ image - hover -text-effect-html-cssIn today's video I'll be showing you how to ...
Read more >
The Many Ways to Change an SVG Fill on Hover ... - CSS-Tricks
Target the .icon class in CSS and set the SVG fill property on the hover state to swap colors. .icon: ...
Read more >
Bootstrap Hover effects - examples & tutorial - MDBootstrap
MDB hover effect appears when the user positions the computer cursor over an element without activating it. Hover effects make a website more...
Read more >
Color enumeration and ColorFade, ColorValue, and RGBA ...
Color enumeration ColorValue RGBA Color.AliceBlue ColorValue( "#f0f8ff" ) ColorValue( "aliceblue" ) RGBA( 240, 248, 25... Color.Aqua ColorValue( "#00ffff" ) ColorValue( "AQUA" ) RGBA( 0, 255,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found