public string GetPushpinColors(ImageAtLocation img, out string strokeHex) { double percentAlongTotalRange = IntervalToAgeFilter.ImageToParameter(img); Color fillColor = ColorHelper.GetBlendedColor(percentAlongTotalRange); //Color fillColor = HSL2RGB(0.8, percentAlongTotalRange, 0.7, 0.6); //Color fillColor = RainBowColor(percentAlongTotalRange * 255, 255); //string fillHex = fillColor.ToString(); string fillHex = "#" + fillColor.Name.ToString(); Color strokeColor = ColorHelper.GetBlendedDarkerColor(percentAlongTotalRange); //Color strokeColor = HSL2RGB(0.8, percentAlongTotalRange, 0.7, 0.2); //Color strokeColor = RainBowColor(percentAlongTotalRange * 255, 255, 0); //strokeHex = strokeColor.ToString(); strokeHex = "#" + strokeColor.Name.ToString(); //Color t = HSL2RGB(percentAlongTotalRange, 0.5, 0.5); return(fillHex); }
public void ApplyImageFilters() { IntervalToAgeFilter.SetIntervalToAgeFilter(); DateTime startTime = IntervalToAgeFilter.ValueToDateTime(LowerAgeValue); DateTime endTime = IntervalToAgeFilter.ValueToDateTime(UpperAgeValue); List <ImageAtLocation> list = _imageLocations.Where(s => s.TimeImageTaken >= startTime && s.TimeImageTaken <= endTime).Select(s => s).ToList(); this._filteredImageLocations.Clear(); this._filteredImageLocations.AddRange(list); List <ImageAtLocation> listUnassigned = _unassignedImageLocations.Where(s => s.TimeImageTaken >= startTime && s.TimeImageTaken <= endTime).Select(s => s).ToList(); this._filteredUnassignedImageLocations.Clear(); this._filteredUnassignedImageLocations.AddRange(listUnassigned); }