7 Replies Latest reply on Jan 2, 2018 10:59 AM by Toby Erkson

    Multiple Color Palettes (Version 10.4)

    Dequan Harrison

      Screen Shot 2017-12-01 at 2.13.40 PM.png

      I would like to create multiple custom color palettes for regular, diverging, and sequential with the code below but when I open Tableau I the above error.

       

      <?xml version='1.0'?>

       

      <workbook>

      <preferences>

      <color-palette name="Custom-Categories" type="regular">

      <color>#264653</color>

              <color>#2A9D8F</color>

              <color>#E9C46A</color>

              <color>#F4A261</color>

              <color>#E76F51</color>

      </color-palette>

      <color-palette name="Custom-Categories two” type="regular">

      <color>#ED6A5A</color>

              <color>#F4F1BB</color>

              <color>#9BC1BC</color>

              <color>#5CA4A9</color>

              <color>#E6EBE0</color>

      </color-palette>

      <color-palette name="Custom-Diverging" type="ordered-diverging">

              <color>#2A9D8F </color>

              <color>#E76F51</color>

      </color-palette>

      </preferences>

      </workbook>

       

      Thanks in advance!

        • 1. Re: Multiple Color Palettes (Version 10.4)
          Brent Mathison

          You're missing the </color-palette> tag at the end of your first custom palette:

           

          <color-palette name="Custom-Categories" type="regular">

          <color>#264653</color>

                  <color>#2A9D8F</color>

                  <color>#E9C46A</color>

                  <color>#F4A261</color>

                  <color>#E76F51</color>

          </color-palette>

          • 2. Re: Multiple Color Palettes (Version 10.4)
            Dequan Harrison

            Thanks! What about if I wanted to do 3. I get an error for this and I have the </color-palette> tag.

             

            <?xml version='1.0'?>

             

            <workbook>

            <preferences>

            <color-palette name="Custom-Categories" type="regular">

            <color>#264653</color>

                    <color>#2A9D8F</color>

                    <color>#E9C46A</color>

                    <color>#F4A261</color>

                    <color>#E76F51</color>

            </color-palette>

            <color-palette name="Custom-Categories two” type="regular">

            <color>#ED6A5A</color>

                    <color>#F4F1BB</color>

                    <color>#9BC1BC</color>

                    <color>#5CA4A9</color>

                    <color>#E6EBE0</color>

            </color-palette>

            <color-palette name="Custom-Diverging" type="ordered-diverging">

                    <color>#2A9D8F </color>

                    <color>#E76F51</color>

            </color-palette>

            </preferences>

            </workbook>

            • 3. Re: Multiple Color Palettes (Version 10.4)
              Brent Mathison

              It looks like you have different quote types in your Custom-Categories two tag:

               

              1.png

              • 4. Re: Multiple Color Palettes (Version 10.4)
                Dequan Harrison

                Awesome, that worked! So, how many custom palettes can I add?

                • 5. Re: Multiple Color Palettes (Version 10.4)
                  Brent Mathison

                  Great! I'm not sure what the limit is. I have ~40 custom palettes in my preferences file, and there are no issues.

                  • 6. Re: Multiple Color Palettes (Version 10.4)
                    Dequan Harrison

                    Ok cool. Thanks alot!!!

                    • 7. Re: Multiple Color Palettes (Version 10.4)
                      Toby Erkson

                      Do not use MS Word or other word processing application.  You need to use Notepad or Notepad++ i.e. a regular text editor.  I can see the wrong quote used but to help see it better I recommend using a different font to help make the mistake stand out.  Courier or Courier New is best.

                       

                      You have used the wrong form of double-quote so use the below instead:

                      <?xml version='1.0'?>

                      <workbook>

                      <preferences>

                      <color-palette name="Custom-Categories" type="regular">

                      <color>#264653</color>

                              <color>#2A9D8F</color>

                              <color>#E9C46A</color>

                              <color>#F4A261</color>

                              <color>#E76F51</color>

                      </color-palette>

                      <color-palette name="Custom-Categories two" type="regular">

                      <color>#ED6A5A</color>

                              <color>#F4F1BB</color>

                              <color>#9BC1BC</color>

                              <color>#5CA4A9</color>

                              <color>#E6EBE0</color>

                      </color-palette>

                      <color-palette name="Custom-Diverging" type="ordered-diverging">

                              <color>#2A9D8F </color>

                              <color>#E76F51</color>

                      </color-palette>

                      </preferences>

                      </workbook>