#149: LegendColor considers brightness (2 - relations too)

pull/150/head
KIRCHSTH 5 years ago
parent 41b3a20f09
commit bbbda8c6e8

@ -224,7 +224,7 @@ $tagSkin
$elementSkin $elementSkin
!endprocedure !endprocedure
!unquoted function $contrastColor($color) !unquoted function $contrastLegend($color)
!if (%is_dark($color)) !if (%is_dark($color))
!$value = $LEGEND_LIGHT_COLOR !$value = $LEGEND_LIGHT_COLOR
!else !else
@ -233,7 +233,7 @@ $elementSkin
!return $value !return $value
!endfunction !endfunction
!unquoted function $flatColor($color) !unquoted function $flatLegend($color)
!if (%is_dark($color)) !if (%is_dark($color))
!$value = $LEGEND_DARK_COLOR !$value = $LEGEND_DARK_COLOR
!else !else
@ -257,19 +257,19 @@ $elementSkin
!if ($fo == "") !if ($fo == "")
!if ($bg != "") !if ($bg != "")
!$fo = $contrastColor($bg) !$fo = $contrastLegend($bg)
!else !else
!if ($bo == "") !if ($bo == "")
!$fo = $LEGEND_DARK_COLOR !$fo = $LEGEND_DARK_COLOR
!$bg = $LEGEND_LIGHT_COLOR !$bg = $LEGEND_LIGHT_COLOR
!else !else
!$fo = $flatColor($bo) !$fo = $flatLegend($bo)
!$bg = $contrastColor($bo) !$bg = $contrastLegend($bo)
!endif !endif
!endif !endif
!else !else
!if ($bg == "") !if ($bg == "")
!$bg = $contrastColor($fo) !$bg = $contrastLegend($fo)
!endif !endif
!endif !endif
@ -316,12 +316,12 @@ $elementSkin
!if ($lineColor!="") !if ($lineColor!="")
!$tagEntry = $tagEntry + "<color:"+$lineColor+"> <U+2500></color> " !$tagEntry = $tagEntry + "<color:"+$lineColor+"> <U+2500></color> "
!else !else
!$tagEntry = $tagEntry + " <U+2500> " !$tagEntry = $tagEntry + "<color:"+$flatLegend($ARROW_COLOR)+"> <U+2500></color> "
!endif !endif
!if ($textColor!="") !if ($textColor!="")
!$tagEntry = $tagEntry + "<color:"+$textColor+">" !$tagEntry = $tagEntry + "<color:"+$textColor+">"
!else !else
!$tagEntry = $tagEntry + "<color:"+$LEGEND_UNDEFINED_FONT_COLOR+">" !$tagEntry = $tagEntry + "<color:"+$flatLegend($ARROW_COLOR)+">"
!endif !endif
!$tagEntry = $tagEntry + " " + $tagStereo + " " !$tagEntry = $tagEntry + " " + $tagStereo + " "
!if ($textColor == "") !if ($textColor == "")

Loading…
Cancel
Save