Recently, I needed a function to generate color values to reflect the relative intensity of numeric values in a range. Visualizations based on this idea are commonly called “Heatmaps”.
My requriement was to show the strength/weight of an edge between two adjacent graph nodes. See picture below:
I searched a bit on the internet but could not find a satisfactory answer so I wrote one in F#. You can find the color generation function in the F# Snippets library here:
BTW for graph layout, I am using WPF with Microsoft Automatic Graph Layout (available to MSDN subscribers).