/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
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Media;
-
- namespace Microsoft.Research.DynamicDataDisplay.Common.Palettes
- {
- /// <summary>
- /// Contains some predefined linear palettes.
- /// </summary>
- public static class LinearPalettes
- {
- private const double geoHeight = 8845 + 400;
- private static LinearPalette geoHeightsPalette = new LinearPalette(
- Color.FromRgb(1, 99, 69), Colors.White,
- new LinearPaletteColorStep(Color.FromRgb(28, 128, 52), (50 + 400) / geoHeight),
- new LinearPaletteColorStep(Color.FromRgb(229, 209, 119), (200 + 400) / geoHeight),
- new LinearPaletteColorStep(Color.FromRgb(160, 66, 1), (1000 + 400) / geoHeight),
- new LinearPaletteColorStep(Color.FromRgb(129, 32, 32), (2000 + 400) / geoHeight),
- new LinearPaletteColorStep(Color.FromRgb(119, 119, 119), (4000 + 400) / geoHeight),
- new LinearPaletteColorStep(Color.FromRgb(244, 244, 244), (6000 + 400) / geoHeight));
-
- /// <summary>
- /// Gets the palette for geo height map visualization.
- /// </summary>
- /// <value>The geo heights palette.</value>
- public static LinearPalette GeoHeightsPalette { get { return geoHeightsPalette; } }
- }
- }