NaturalIntelligence / imglab

To speedup and simplify image labeling/ annotation process with multiple supported formats.
https://solothought.com/imglab/
MIT License
977 stars 596 forks source link

Added color picker using Spectrum #100

Closed alextychan closed 6 years ago

alextychan commented 6 years ago

Purpose / Goal

Added a color picker using Spectrum to change feature color points. Once the color is changed, it will be changed globally, meaning that all other points will change to the selected color. This is implemented using a global variable in appConfig.

Issue number #94.

Type

Please mention the type of PR

Note : Please ensure that you've read contribution guidelines before raising this PR.

amitguptagwl commented 6 years ago

Thanks for your PR. But, for my understanding, is there any advantage to use any 3rd party library? Can't we use https://www.w3schools.com/colors/colors_picker.asp ?

alextychan commented 6 years ago

The only benefit of using this library would be the backward support.

"input type=color" does not provide support for Safari in accordance to this table. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

But I do agree that using the third party library might be overkill. The file size is pretty huge.

alextychan commented 6 years ago

I have changed it to use the native color picker. Please have a look.

amitguptagwl commented 6 years ago

Thanks for the changes. I believe (though not completely sure) this application is not compatible with safari. And unfortunately I don't have mac to test it.