SciColorMaps icon indicating copy to clipboard operation
SciColorMaps copied to clipboard

More Colors than 256

Open gnimor opened this issue 4 years ago • 2 comments

Hi,

I am looking for a way to create more colors than 256. I am able to provide a higher number to the constructor of color map but this results in an argument exception. So is the number limited to 256?

gnimor avatar Nov 13 '20 10:11 gnimor

Hi,

yes, in the current version the number is limited to 256. You'll need to recompile dll. Simply change the value in this line:

https://github.com/ar1st0crat/SciColorMaps/blob/2f8b15c228e3bf934283b8c9d7ca152688cb4c63/SciColorMaps/SciColorMaps.Portable/ColorMap.cs#L97

I wrote this code quite a long time ago, so I don't remember why I left this number constant (according to comments, I planned max number of colors to be customizable...).

Also, I'm thinking of updating the SciColorMaps Nuget package (add multi-targeting + add some new matplotlib colormaps + fix this issue with number of colors).

ar1st0crat avatar Nov 14 '20 13:11 ar1st0crat

Thanks for the update. I will take a closer look. Anyway I think it would be a great idea to update the NuGet Package :-)

gnimor avatar Nov 16 '20 07:11 gnimor