VectorStyler
    • Categories
    • Unread
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    CSV Formatting Required for Import as a Colour Palette

    Scheduled Pinned Locked Moved Questions and Support
    17 Posts 3 Posters 14.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • VectorStylerV Offline
      VectorStyler @VectorByName
      last edited by

      @VectorByName

      For example, should the CSV file include a header row and if so is there a specific format for the headers, R,G,B, or Red, Green, Blue and so on?

      Yes, see below.

      Should the colours include a name and if so should the name appear in the first or last column?

      Optional, leave empty.

      Should colour conversion values be included for all colours, i.e., both the RGB, CMYK values?

      No

      If both RGB and CMYK values are to be included does it matter which comes first, RGB or CMYK?

      I think this is not possible for now.

      Can colour conversion values be included for other colour formats, e.g., LAB, HEX, HSB and so on?

      No, colors are specified in a single color mode.

      When a value for any particular colour is zero, should a zero be included or should the field be left blank, e.g., should RGB Red be entered a 100,0,0 or 100,,

      Zero to be included

      Example:

      Color Palette,sRGB-255,,
      Name,R (0-255),G (0-255),B (0-255)
      color 1,21,227,48
      color 2,101,189,142
      
      1 Reply Last reply Reply Quote 0
      • V Offline
        VectorByName
        last edited by

        That's perfect, many thanks for the formatting details, very much appreciated.

        1 Reply Last reply Reply Quote 0
        • V Offline
          VectorByName
          last edited by

          Is it also possible to create Hex, Lab and HSL palettes? If so is there a particular format required for the header rows in place of sRGB-255 and R (0-255),G (0-255),B (0-255)?

          • sRGB-255 with R (0-255),G (0-255),B (0-255) works for RGB palettes
          • CMYK with C, M, Y, K works for CMYK palettes

          but HEX, LAB and HSL don't appear to work so just wondering if this is

          a) possible and
          b) if they need to specific formatting

          VectorStylerV 1 Reply Last reply Reply Quote 0
          • VectorStylerV Offline
            VectorStyler @VectorByName
            last edited by

            @VectorByName The CSV palette reader can only do RGB or CMYK for now, and only with per-component numbers.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              Subpath @VectorStyler
              last edited by

              @VectorStyler

              could .xml not be a way to read the
              HEX, Lab and HLS Color Values into VS

              VS color palette can read .xml

              and as far as I know .xml provides
              the different color formats/attributes
              and is Text based

              Win 11
              CPU: AMD Ryzen 5 9600X, 6-core.
              GPU: Nvidia Geforce RTX 5070.

              VectorStylerV 1 Reply Last reply Reply Quote 1
              • VectorStylerV Offline
                VectorStyler @Subpath
                last edited by VectorStyler

                @Subpath @VectorByName The VS color palette saving support XML and JSON file formats. These formats are VS specific, and these support all the color modes.

                1 Reply Last reply Reply Quote 1
                • S Offline
                  Subpath
                  last edited by

                  @VectorByName
                  The .xml file format is also listed
                  in "Open Palette" in the "Color Palette" menu.
                  Above the .csv format.

                  Win 11
                  CPU: AMD Ryzen 5 9600X, 6-core.
                  GPU: Nvidia Geforce RTX 5070.

                  1 Reply Last reply Reply Quote 1
                  • V Offline
                    VectorByName
                    last edited by

                    Perfect, .xml or JSON could work... are there any templates I can refer to that show how either or ideally both file formats need to be created.

                    I would be looking to include values for sRGB, CMYK, HEX, LAB and HSL in a single file.

                    I have a basic understanding of .XML and JSON but they are not formats I work with regularly so any guidance as to the correct layout or the best way to generate both formats would be very much appreciated.

                    Thank you

                    VectorStylerV S 2 Replies Last reply Reply Quote 0
                    • VectorStylerV Offline
                      VectorStyler @VectorByName
                      last edited by

                      @VectorByName If you save a palette in XML or JSON format, you can inspect the file content, it is a quite simple array of colors, with some common heading fields.

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        Subpath @VectorByName
                        last edited by Subpath

                        @VectorByName

                        have only a little experience with .XML in .SVG's.

                        But why not save a palette as .xml from VS via
                        Panels > Color Palette > Palette Menu > Save Palette
                        and then take a look at the file

                        For correct attributes for HEX, LAB, HLS in .XML
                        do a google search

                        Win 11
                        CPU: AMD Ryzen 5 9600X, 6-core.
                        GPU: Nvidia Geforce RTX 5070.

                        1 Reply Last reply Reply Quote 0
                        • V Offline
                          VectorByName
                          last edited by VectorByName

                          Thanks for the feedback...

                          There is one thing baffling me however... when creating a palette using RGB values, regardless of the file format used to create it, i.e., .csv, .xml or JSON, once converted to an .ase file when the palette is opened in either VS or Affinity Software the conversion to CMYK bears no relation to the correct CMYK values.

                          Example RGB 205, 186, 136 should result in CMYK 0, 9, 34, 20 but in...

                          VS it converts as CMYK 17, 19, 44, 0
                          AD it converts as CMYK 20, 23, 53, 0

                          When using the same CMYK Document Settings for both files...

                          Likewise, if the .ase file contains both sRGB and corresponding CMYK values when applying a swatch in a CMYK document, the CMYK values are now correctly honoured, however, the RGB values are incorrect, this is also true if applying a swatch in an sRGB document...

                          Example RGB 205, 186, 136 results in...

                          VS - RGB 200, 179, 132
                          AD - RGB 211, 191, 149

                          Could anyone please explain how the colour conversions are calculated internally and why the swatch values in the .ase file are not respected when converting between colour spaces, i.e., RGB to CMYK. My assumption is that the internal conversion is RGB > LAB > CMYK using colour conversion profiles.

                          If this is the case, are the colour conversion profiles proprietary or is there anywhere where the conversion formula can be viewed to understand how the conversion works which would perhaps help to explain why the conversion doesn't match the expected RGB to CMYK values?

                          It appears that you need to have separate RGB only and CMYK only palettes for the respective RGB and CMYK values entered to be honoured so understanding how the internal RGB to CMYK and CMYK to RGB colour conversions work would be extremely helpful.

                          VectorStylerV 1 Reply Last reply Reply Quote 0
                          • VectorStylerV Offline
                            VectorStyler @VectorByName
                            last edited by

                            @VectorByName Color conversion should happen with the current global color profile.
                            Is it possible to upload here an example ASE file, so that I can test it.
                            Or send it by email to csraba at vectorstyler.com

                            1 Reply Last reply Reply Quote 0
                            • V Offline
                              VectorByName
                              last edited by

                              Hi,

                              Thank you for your reply, I've just sent an email together with the respective ASE files.

                              Many thanks for taking the time to reply and take a look, that is very much appreciated.

                              VectorStylerV 1 Reply Last reply Reply Quote 1
                              • VectorStylerV Offline
                                VectorStyler @VectorByName
                                last edited by

                                @VectorByName Got it!

                                VectorStylerV 1 Reply Last reply Reply Quote 0
                                • VectorStylerV Offline
                                  VectorStyler @VectorStyler
                                  last edited by

                                  @VectorStyler I tested the palettes and I thing this is a combination of missing features and how the color management works (at least in VS).

                                  The missing feature part is that VS will not use the "preview" (RGB) colors of a palette for color conversion. It just takes the CMYK values and displays (and converts) these with whatever color profile is active.
                                  I will try to improve this part in the future.

                                  The VS color management specific part is that regardless what is the document color mode (controlling how the document is rendered), the actual colors for the vectors can be stored in any of the possible color modes.

                                  This means that in a CMYK document, if a color was specified in RGB mode then it is stored in RGB mode and converted to CMYK only while displaying.
                                  So regardless of the color profile, this color will have the same RGB values.
                                  Same goes for Lab and other color modes.

                                  Of course, by default, the CMYK documents will contain CMYK colors (the panel is in CMYK mode), and RGB will have RGB.

                                  V 1 Reply Last reply Reply Quote 0
                                  • V Offline
                                    VectorByName @VectorStyler
                                    last edited by

                                    @VectorStyler Many thanks for your help and feedback regarding this, thank you for taking the time to investigate...

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post