spatialillusions/milsymbol

monoColor

Closed this issue · 3 comments

muby commented

Hello,

I would to know there is a simple way to get MonoColor that can take a string like today or a ColorMode ?

Thanks a lot

muby commented

I think I was not clear or I don't understand you answer :)

What I want to do is to be able to assign ColorMode to monoColor.

For example :
Working :

new ms.Symbol("SFGPEVAC--**--*", {
      }, {standard:"APP6",monoColor:"red",size:200}).asSVG()

or

Not Working

new ms.Symbol("SFGPEVAC--**--*", {
      }, {standard:"APP6",monoColor:ms.ColorMode("purple", "blue", "red", "green", "yellow"),size:200}).asSVG()
new ms.Symbol("SFGPEVAC--**--*", {
      }, {standard:"APP6",monoColor:ms.getColorMode("Light"),size:200}).asSVG()

If you first override the frame colormode:

let fs = ms.getColorMode("FrameColor")
fs.Civilian = "purple"
fs.Friend = "blue"
fs.Hostile = "red"
fs.Neutral = "green"
fs.Unknown = "yellow"

// Not sure if you have to do this
ms.setColorMode("FrameColor", fs)

Then you will get your symbols as you want, if you request them unfilled:

new ms.Symbol("SFGPEVAC--**--*", {
      }, {standard:"APP6",fill:false,size:200}).asSVG()