SciColorMaps
SciColorMaps copied to clipboard
More Colors than 256
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?
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).
Thanks for the update. I will take a closer look. Anyway I think it would be a great idea to update the NuGet Package :-)