Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "color bar" look-up table option to Colormap module #222

Open
1 of 4 tasks
jywarren opened this issue Apr 28, 2018 · 6 comments
Open
1 of 4 tasks

Add "color bar" look-up table option to Colormap module #222

jywarren opened this issue Apr 28, 2018 · 6 comments

Comments

@jywarren
Copy link
Member

jywarren commented Apr 28, 2018

image

Let's:

  1. rename the segmented-colormap module to simply colormap and
  2. get it to optionally overlay a 0-100% reference color bar to show the color mapping we're using, as in the above example

The first version need not show the numeric range, which currently would be only 0-255 as per the module notes: https://github.com/publiclab/image-sequencer/blob/master/src/modules/SegmentedColormap/SegmentedColormap.js

Follow-up issues could be:

  1. to allow setting the range to values other than 0-255 with an options.range = [low, high] setting
  2. displaying the low and high range values on the colorbar itself, although this would require the ability to write text, which we don't currently have (Various module ideas to be broken out into separate issues #165)
@jywarren
Copy link
Member Author

GitMate.io thinks possibly related issues are #52 (segmented-colormap module), #157 (Add a Contrast module), #97 (Add module options to CLI), #158 (Add a Saturation Module), and #27 (add fisheyegl module).

@jywarren
Copy link
Member Author

Here's a good reference for how to convert a min and max value into a colorbar using a colormap function like we have:

https://github.com/publiclab/infragram/blob/eb9fc19f993616caf9aa0311f7468d33c4529253/src/processors/javascript.js#L135-L154

colorbar could in fact be its own module which we call from here -- accepting an x,y location to draw the colorbar and the min,max and colorize() functions -- it's all nice and modular :-)

@marzann
Copy link

marzann commented Apr 29, 2018

@jywarren, could you include a webpage link where the color bar would be added?

@jywarren
Copy link
Member Author

jywarren commented Apr 29, 2018 via email

@marzann
Copy link

marzann commented Apr 29, 2018

I would like to confirm 2 items:

  1. the file to work on
  2. the page url to test it :)

@jywarren
Copy link
Member Author

Oh i'm so sorry i missed this comment! If you're still interested perhaps we can pick back up here or in another issue?

I'm chiming in with a link to a colormapping lib I found: https://github.com/santilland/plotty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants