Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color extensions #9

Open
3 tasks done
ebocher opened this issue Apr 27, 2020 · 1 comment
Open
3 tasks done

Color extensions #9

ebocher opened this issue Apr 27, 2020 · 1 comment
Assignees

Comments

@ebocher
Copy link
Member

ebocher commented Apr 27, 2020

  • Add RGBColor extension with the encoding : rgb(255,0,0)

  • Add HexaColor extension. Notation is notation is a ‘#’ immediately followed by either three or six hexadecimal characters.

  • Add WellKnownNameColor extension with a list of color names as proposed by X11 : https://en.wikipedia.org/wiki/X11_color_names

@ebocher ebocher self-assigned this Apr 27, 2020
@ebocher ebocher changed the title Color extension Color extensions Apr 27, 2020
@ebocher
Copy link
Member Author

ebocher commented May 18, 2020

The feature2 style supports now the rgb, hexa and wellknown name columns.
The color elements is encoded as

<Feature2DStyle>
  <Name>Unnamed Style</Name>
  <Rule>
    <Name>Default Rule</Name>
    <LineSymbolizer>
      <Name>LineSymbolizer with WellknownNameColor</Name>
      <Uom>PX</Uom>
      <Level>0</Level>
      <PenStroke>
        <SolidFill>
          <Color>orange</Color>
        </SolidFill>
        <Width>0.25</Width>
        <LineCap>BUTT</LineCap>
        <LineJoin>MITRE</LineJoin>
      </PenStroke>
    </LineSymbolizer>
    <LineSymbolizer>
      <Name>LineSymbolizer with  WellknownNameColor expression</Name>
      <Uom>PX</Uom>
      <Level>0</Level>
      <PenStroke>
        <SolidFill>
          <Color>expression(orange)</Color>
        </SolidFill>
        <Width>0.25</Width>
        <LineCap>BUTT</LineCap>
        <LineJoin>MITRE</LineJoin>
      </PenStroke>
    </LineSymbolizer>
    <LineSymbolizer>
      <Name>LineSymbolizer with RGBColor</Name>
      <Uom>PX</Uom>
      <Level>0</Level>
      <PenStroke>
        <SolidFill>
          <Color>rgb(0,0,0)</Color>
        </SolidFill>
        <Width>0.25</Width>
        <LineCap>BUTT</LineCap>
        <LineJoin>MITRE</LineJoin>
      </PenStroke>
    </LineSymbolizer>
    <LineSymbolizer>
      <Name>LineSymbolizer with  RGBColor expression</Name>
      <Uom>PX</Uom>
      <Level>0</Level>
      <PenStroke>
        <SolidFill>
          <Color>rgb(expression(22),expression(15),expression(120))</Color>
        </SolidFill>
        <Width>0.25</Width>
        <LineCap>BUTT</LineCap>
        <LineJoin>MITRE</LineJoin>
      </PenStroke>
    </LineSymbolizer>
    <LineSymbolizer>
      <Name>LineSymbolizer with HexaColor</Name>
      <Uom>PX</Uom>
      <Level>0</Level>
      <PenStroke>
        <SolidFill>
          <Color>#000000</Color>
        </SolidFill>
        <Width>0.25</Width>
        <LineCap>BUTT</LineCap>
        <LineJoin>MITRE</LineJoin>
      </PenStroke>
    </LineSymbolizer>
    <LineSymbolizer>
      <Name>LineSymbolizer with HexaColor expression</Name>
      <Uom>PX</Uom>
      <Level>0</Level>
      <PenStroke>
        <SolidFill>
          <Color>expression(#000000)</Color>
        </SolidFill>
        <Width>0.25</Width>
        <LineCap>BUTT</LineCap>
        <LineJoin>MITRE</LineJoin>
      </PenStroke>
    </LineSymbolizer>
  </Rule>
</Feature2DStyle>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant