Altair default color palette colors in HEX





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















How can I find the HEX representation of Altair default color palette? Every plotting tool has its strengths & weaknesses and I typically end up generating visualizations consist of Seaborn + Altair. I would like to match Altair colors in Seaborn. For Seaborn, you can get the relevant HEX color representation of color_palette as follows and was wondering how can I get similar color information in Altair.



import seaborn as sns
sns.color_palette('Set2').as_hex()
Out[131]:
['#66c2a5',
'#fc8d62',
'#8da0cb',
'#e78ac3',
'#a6d854',
'#ffd92f',
'#e5c494',
'#b3b3b3']









share|improve this question































    0















    How can I find the HEX representation of Altair default color palette? Every plotting tool has its strengths & weaknesses and I typically end up generating visualizations consist of Seaborn + Altair. I would like to match Altair colors in Seaborn. For Seaborn, you can get the relevant HEX color representation of color_palette as follows and was wondering how can I get similar color information in Altair.



    import seaborn as sns
    sns.color_palette('Set2').as_hex()
    Out[131]:
    ['#66c2a5',
    '#fc8d62',
    '#8da0cb',
    '#e78ac3',
    '#a6d854',
    '#ffd92f',
    '#e5c494',
    '#b3b3b3']









    share|improve this question



























      0












      0








      0








      How can I find the HEX representation of Altair default color palette? Every plotting tool has its strengths & weaknesses and I typically end up generating visualizations consist of Seaborn + Altair. I would like to match Altair colors in Seaborn. For Seaborn, you can get the relevant HEX color representation of color_palette as follows and was wondering how can I get similar color information in Altair.



      import seaborn as sns
      sns.color_palette('Set2').as_hex()
      Out[131]:
      ['#66c2a5',
      '#fc8d62',
      '#8da0cb',
      '#e78ac3',
      '#a6d854',
      '#ffd92f',
      '#e5c494',
      '#b3b3b3']









      share|improve this question
















      How can I find the HEX representation of Altair default color palette? Every plotting tool has its strengths & weaknesses and I typically end up generating visualizations consist of Seaborn + Altair. I would like to match Altair colors in Seaborn. For Seaborn, you can get the relevant HEX color representation of color_palette as follows and was wondering how can I get similar color information in Altair.



      import seaborn as sns
      sns.color_palette('Set2').as_hex()
      Out[131]:
      ['#66c2a5',
      '#fc8d62',
      '#8da0cb',
      '#e78ac3',
      '#a6d854',
      '#ffd92f',
      '#e5c494',
      '#b3b3b3']






      python data-visualization altair






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 7 at 17:06









      jakevdp

      20.1k33657




      20.1k33657










      asked Jan 3 at 3:18









      oekicioekici

      143




      143
























          2 Answers
          2






          active

          oldest

          votes


















          0














          The color palettes used by Altair are realized in the Vega-Lite renderer, as defined by the vega-scale package.



          A human-readable summary is in the Color Schemes section of the Vega documentation. The color schemes are actually defined in schemes.js and palettes.js.



          Unfortunately, the color palette details are not available via Altair from the Python package itself.






          share|improve this answer































            0














            It seems like the default color palette of Altair is quite similar to (if not the same) Category 10:



            1f77b4, #ff7f0e, #2ca02c, #d62728, #9467bd, #8c564b, #e377c2, #7f7f7f, #bcbd22, #17becf



            The details of different palettes are here: https://d3-wiki.readthedocs.io/zh_CN/master/Ordinal-Scales/



            enter image description here






            share|improve this answer
























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54015895%2faltair-default-color-palette-colors-in-hex%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              The color palettes used by Altair are realized in the Vega-Lite renderer, as defined by the vega-scale package.



              A human-readable summary is in the Color Schemes section of the Vega documentation. The color schemes are actually defined in schemes.js and palettes.js.



              Unfortunately, the color palette details are not available via Altair from the Python package itself.






              share|improve this answer




























                0














                The color palettes used by Altair are realized in the Vega-Lite renderer, as defined by the vega-scale package.



                A human-readable summary is in the Color Schemes section of the Vega documentation. The color schemes are actually defined in schemes.js and palettes.js.



                Unfortunately, the color palette details are not available via Altair from the Python package itself.






                share|improve this answer


























                  0












                  0








                  0







                  The color palettes used by Altair are realized in the Vega-Lite renderer, as defined by the vega-scale package.



                  A human-readable summary is in the Color Schemes section of the Vega documentation. The color schemes are actually defined in schemes.js and palettes.js.



                  Unfortunately, the color palette details are not available via Altair from the Python package itself.






                  share|improve this answer













                  The color palettes used by Altair are realized in the Vega-Lite renderer, as defined by the vega-scale package.



                  A human-readable summary is in the Color Schemes section of the Vega documentation. The color schemes are actually defined in schemes.js and palettes.js.



                  Unfortunately, the color palette details are not available via Altair from the Python package itself.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 3 at 21:37









                  jakevdpjakevdp

                  20.1k33657




                  20.1k33657

























                      0














                      It seems like the default color palette of Altair is quite similar to (if not the same) Category 10:



                      1f77b4, #ff7f0e, #2ca02c, #d62728, #9467bd, #8c564b, #e377c2, #7f7f7f, #bcbd22, #17becf



                      The details of different palettes are here: https://d3-wiki.readthedocs.io/zh_CN/master/Ordinal-Scales/



                      enter image description here






                      share|improve this answer




























                        0














                        It seems like the default color palette of Altair is quite similar to (if not the same) Category 10:



                        1f77b4, #ff7f0e, #2ca02c, #d62728, #9467bd, #8c564b, #e377c2, #7f7f7f, #bcbd22, #17becf



                        The details of different palettes are here: https://d3-wiki.readthedocs.io/zh_CN/master/Ordinal-Scales/



                        enter image description here






                        share|improve this answer


























                          0












                          0








                          0







                          It seems like the default color palette of Altair is quite similar to (if not the same) Category 10:



                          1f77b4, #ff7f0e, #2ca02c, #d62728, #9467bd, #8c564b, #e377c2, #7f7f7f, #bcbd22, #17becf



                          The details of different palettes are here: https://d3-wiki.readthedocs.io/zh_CN/master/Ordinal-Scales/



                          enter image description here






                          share|improve this answer













                          It seems like the default color palette of Altair is quite similar to (if not the same) Category 10:



                          1f77b4, #ff7f0e, #2ca02c, #d62728, #9467bd, #8c564b, #e377c2, #7f7f7f, #bcbd22, #17becf



                          The details of different palettes are here: https://d3-wiki.readthedocs.io/zh_CN/master/Ordinal-Scales/



                          enter image description here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 28 at 18:52









                          oekicioekici

                          143




                          143






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54015895%2faltair-default-color-palette-colors-in-hex%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              MongoDB - Not Authorized To Execute Command

                              How to fix TextFormField cause rebuild widget in Flutter

                              in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith