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

Add additional resources - color palettes and text styles #34

Open
phidrho opened this issue Feb 11, 2025 · 4 comments
Open

Add additional resources - color palettes and text styles #34

phidrho opened this issue Feb 11, 2025 · 4 comments
Assignees
Labels

Comments

@phidrho
Copy link

phidrho commented Feb 11, 2025

Hi,

I am in need to share/download additional resources that are not currently available via website:

Color palettes - implemented as "GIMP Palettes" or "gpl" files

  • they are simple ASCII files which define colors - usually 4 columns (RGB and color name)
GIMP Palette
Name: Test Palette
Columns: 4
#
  0   0   0	#000000
255 255 255	#ffffff
166 206 227	#a6cee3
 31 120 180	#1f78b4
178 223 138	#b2df8a
 51 160  44	#33a02c
251 154 153	#fb9a99
227  26  28	#e31a1c
253 191 111	#fdbf6f
255 127   0	#ff7f00
255   0 255	Custom Color 1
255 255 255	Custom Color 2
 65  65  65	My Color 1
128 128 128	My Color 2
255   0   0	Red
...
  • specific colors are usually defined by state cartography specification - I'm attaching example from Croatian cartography specification

colors specification example for cartography

  • these are used in "Select Color" dialog on the "Color swatches" tab, and can be exported and imported (entire palette or merging colors into existing palette)

Import and export GPL files from QGIS Desktop

Text Styles - implemented as XML style specification

<!DOCTYPE qgis_style>
<qgis_style version="2">
  <symbols/>
  <colorramps/>
  <textformats>
    <textformat name="Zbirka_AN" tags="croatia">
      <text-style forcedBold="0" fontKerning="1" allowHtml="0" namedStyle="Regular" multilineHeight="1" fontSizeUnit="MM" blendMode="0" textColor="50,50,50,255,rgb:0.19607843137254902,0.19607843137254902,0.19607843137254902,1" fontItalic="0" fontFamily="Arial Narrow" fontStrikeout="0" tabStopDistance="80" capitalization="0" textOpacity="1" tabStopDistanceUnit="Point" fontSize="3" fontWeight="50" previewBkgrdColor="255,255,255,255,rgb:1,1,1,1" fontLetterSpacing="0" tabStopDistanceMapUnitScale="3x:0,0,0,0,0,0" fontUnderline="0" fontWordSpacing="0" forcedItalic="0" multilineHeightUnit="Percentage" fontSizeMapUnitScale="3x:0,0,0,0,0,0" textOrientation="horizontal">
        <families/>
        <text-buffer bufferColor="250,250,250,255,rgb:0.98039215686274506,0.98039215686274506,0.98039215686274506,1" bufferSizeMapUnitScale="3x:0,0,0,0,0,0" bufferBlendMode="0" bufferJoinStyle="128" bufferNoFill="1" bufferSizeUnits="MM" bufferOpacity="1" bufferSize="1" bufferDraw="0"/>
        <text-mask maskJoinStyle="128" maskSize="1.5" maskSizeMapUnitScale="3x:0,0,0,0,0,0" maskEnabled="0" maskType="0" maskedSymbolLayers="" maskOpacity="1" maskSizeUnits="MM" maskSize2="1.5"/>
        <background shapeSizeMapUnitScale="3x:0,0,0,0,0,0" shapeBlendMode="0" shapeSizeUnit="Point" shapeRotation="0" shapeRotationType="0" shapeBorderColor="128,128,128,255,rgb:0.50196078431372548,0.50196078431372548,0.50196078431372548,1" shapeSizeType="0" shapeSizeY="0" shapeBorderWidthMapUnitScale="3x:0,0,0,0,0,0" shapeBorderWidthUnit="Point" shapeSizeX="0" shapeOffsetMapUnitScale="3x:0,0,0,0,0,0" shapeOffsetY="0" shapeDraw="0" shapeType="0" shapeOpacity="1" shapeRadiiX="0" shapeOffsetX="0" shapeBorderWidth="0" shapeOffsetUnit="Point" shapeFillColor="255,255,255,255,rgb:1,1,1,1" shapeSVGFile="" shapeRadiiY="0" shapeRadiiMapUnitScale="3x:0,0,0,0,0,0" shapeJoinStyle="64" shapeRadiiUnit="Point">
          <symbol type="marker" name="markerSymbol" is_animated="0" frame_rate="10" alpha="1" clip_to_extent="1" force_rhr="0">
            <data_defined_properties>
              <Option type="Map">
...
  • text styles have their own category in Style Manager
  • we have all other style categories listed on website except Text Format
  • specific colors are usually defined by state cartography specification - I'm attaching example from Croatian cartography specification

text styles specification example for cartography

  • Text Format style can be imported/exported on their own, without other styling settings

Text Format dialog in Style Manager

@Xpirix
Copy link
Collaborator

Xpirix commented Feb 11, 2025

Hi @phidrho , thanks for this.

My suggestion is to upload the XML style on the Hub website: https://hub.qgis.org/styles/add/ (requires an OSGeo Login). It will be then reviewed by the Style Managers and will show up in the list once approved.
Please let me know if you have any issues.

Regards,

@phidrho
Copy link
Author

phidrho commented Feb 11, 2025

Hi @phidrho , thanks for this.

My suggestion is to upload the XML style on the Hub website: https://hub.qgis.org/styles/add/ (requires an OSGeo Login). It will be then reviewed by the Style Managers and will show up in the list once approved. Please let me know if you have any issues.

Regards,

If I understood well, these categories aren't yet created because currently we don't have any resources to display on web?

I also noticed that 3D Symbols Styling are missing.

Image

Image

And what about Color Palette files? Should we post them on the same subpage with Styles (https://hub.qgis.org/styles/), or we'll create a new Hub subpage?

@Xpirix
Copy link
Collaborator

Xpirix commented Feb 11, 2025

Let me take a look and get back to you.

@Xpirix Xpirix self-assigned this Feb 12, 2025
@Xpirix Xpirix added the Size 2 label Feb 12, 2025
@Xpirix Xpirix moved this to This sprint in QGIS Websites Maitenance Feb 12, 2025
@Xpirix Xpirix moved this from This sprint to In Progress in QGIS Websites Maitenance Feb 12, 2025
@Xpirix
Copy link
Collaborator

Xpirix commented Feb 12, 2025

Hi @phidrho

If I understood well, these categories aren't yet created because currently we don't have any resources to display on web?
I also noticed that 3D Symbols Styling are missing.

Yes, that's right. After checking the code and the feature locally, the Text Format and the Symbol3D will be created automatically whenever a new style with these types is uploaded.

And what about Color Palette files? Should we post them on the same subpage with Styles (https://hub.qgis.org/styles/), or we'll create a new Hub subpage?

The Color Palette type is not supported yet but the suggested PR at #45 will add that feature once applied. Please also feel free to share your thoughts about it.

@Xpirix Xpirix added Size 3 and removed Size 2 labels Feb 12, 2025
@Xpirix Xpirix moved this from In Progress to Review in progress in QGIS Websites Maitenance Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review in progress
Development

No branches or pull requests

2 participants