/Main/src/DynamicDataDisplay/Common/Palettes/LinearPalettes.cs
C# | 30 lines | 21 code | 2 blank | 7 comment | 0 complexity | f4ba0e4c773f61abcfb030d1232528e3 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Text; 5using System.Windows.Media; 6 7namespace Microsoft.Research.DynamicDataDisplay.Common.Palettes 8{ 9 /// <summary> 10 /// Contains some predefined linear palettes. 11 /// </summary> 12 public static class LinearPalettes 13 { 14 private const double geoHeight = 8845 + 400; 15 private static LinearPalette geoHeightsPalette = new LinearPalette( 16 Color.FromRgb(1, 99, 69), Colors.White, 17 new LinearPaletteColorStep(Color.FromRgb(28, 128, 52), (50 + 400) / geoHeight), 18 new LinearPaletteColorStep(Color.FromRgb(229, 209, 119), (200 + 400) / geoHeight), 19 new LinearPaletteColorStep(Color.FromRgb(160, 66, 1), (1000 + 400) / geoHeight), 20 new LinearPaletteColorStep(Color.FromRgb(129, 32, 32), (2000 + 400) / geoHeight), 21 new LinearPaletteColorStep(Color.FromRgb(119, 119, 119), (4000 + 400) / geoHeight), 22 new LinearPaletteColorStep(Color.FromRgb(244, 244, 244), (6000 + 400) / geoHeight)); 23 24 /// <summary> 25 /// Gets the palette for geo height map visualization. 26 /// </summary> 27 /// <value>The geo heights palette.</value> 28 public static LinearPalette GeoHeightsPalette { get { return geoHeightsPalette; } } 29 } 30}