Color (Generics List) to Color[]
-
It's not as simple as it sounds List.Count != Color[].Length so I can't use List.ToArray() List will have n number of colours. I expect usually around 5-6. Color[] will probably have Length of 256. I want to dynamically blend the few colours from the List into Color[]. I'm trying to split the 256 into sections and blend 2 colours at a time. ie 256 / List.Count -1 My head's not in gear today so the Maths is escaping me... Any help appreciated. PS I'm playing with Fractals and I want to implement an editable colour palette. I did it a couple of years ago but I lost of the code and I'm trying to redo it...
-
It's not as simple as it sounds List.Count != Color[].Length so I can't use List.ToArray() List will have n number of colours. I expect usually around 5-6. Color[] will probably have Length of 256. I want to dynamically blend the few colours from the List into Color[]. I'm trying to split the 256 into sections and blend 2 colours at a time. ie 256 / List.Count -1 My head's not in gear today so the Maths is escaping me... Any help appreciated. PS I'm playing with Fractals and I want to implement an editable colour palette. I did it a couple of years ago but I lost of the code and I'm trying to redo it...
And what do you want to do? Blend some colors from List<> with different colors from Color[]? To blend 2 colors at a time you don't need to split anything but rather write a loop that processes somehow each pair of colors. Then increments by 2. However, I'm confused about what you want to achieve...
-
And what do you want to do? Blend some colors from List<> with different colors from Color[]? To blend 2 colors at a time you don't need to split anything but rather write a loop that processes somehow each pair of colors. Then increments by 2. However, I'm confused about what you want to achieve...
Ok, having googled a bit more, the terminology is interpolate. I have, say, 5 colours that I need to interpolate across a Color[256].