You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe pH is too complex as a next step, since it has 4 patches. What about another test that just accepts a min color and a max color, and provides a linear scale between them. So the parameters could be:
color1 (hex) color2 (hex) minValue maxValue scale (string, "linear" by default for now, eventually maybe exponential, logarithmic, etc)
These could be passed into a constructor like:
// This outputs an object:varcolorimetry=newColorimetry(color1,color2,minValue,maxValue,scale)colorimetry.setupUI();// generates the demovaroutput=colorimetry.getValue(color3);// give it a hex value
Something like this for a very basic color comparison?
Maybe it would need to be compartmentalized somehow, like we load an image into a generic object like:
varimage=newColorimetryImage('url');// this loads the image into an internal sequencervarregion1=image.getAverage(x1,y1,h1,w1);varregion2=image.getAverage(x2,y2,h2,w2);colorimetry.compareColors(averageColor1,averageColor2);
Or would the all be part of the same object?
I'm just brainstorming a good general-purpose architecture here. What do you think, @Divy123 ? Can this accommodate the original use case, but make it more generalizable to different kinds of colorimetry?
The text was updated successfully, but these errors were encountered:
The initial demo at https://divy123.github.io/colorimetry/public/ is great. It's specific to the use case at publiclab/image-sequencer#979.
How can we generalize the code? Can we adapt it to run on pH strips?
https://duckduckgo.com/?q=ph+test+strip&atb=v121-6&ia=images&iax=images
Here is how pH strip comparisons work manually:
Maybe pH is too complex as a next step, since it has 4 patches. What about another test that just accepts a min color and a max color, and provides a linear scale between them. So the parameters could be:
color1
(hex)color2
(hex)minValue
maxValue
scale
(string, "linear" by default for now, eventually maybe exponential, logarithmic, etc)These could be passed into a constructor like:
Something like this for a very basic color comparison?
The initial demo as built would be more like:
Maybe it would need to be compartmentalized somehow, like we load an image into a generic object like:
Or would the all be part of the same object?
I'm just brainstorming a good general-purpose architecture here. What do you think, @Divy123 ? Can this accommodate the original use case, but make it more generalizable to different kinds of colorimetry?
The text was updated successfully, but these errors were encountered: