CSV Formatting Required for Import as a Colour Palette



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



  • 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


  • administrators

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



  • @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


  • administrators

    @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.



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



  • 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


  • administrators

    @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.



  • @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



  • 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.


  • administrators

    @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



  • 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.


  • administrators

    @VectorByName Got it!


  • administrators

    @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.



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