How to define a custom pgf color palette from a given base color?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.



The code is the following:



documentclassarticle

usepackagepgfplots
usepgfplotslibrarycolorbrewer

pgfplotssetcompat=newest

definecolormyblueRGB95,145,166

begindocument

tikz path node[rectangle, fill=myblue,inner sep=1cm] ;

begintikzpicture

beginaxis[
xbar stacked,
cycle list/Blues-7, cycle list name=Blues-7,
every axis plot/.style=fill
]

addplot table
first second
1 5
2 6
3 7
4 8
;

addplot table
first second
1 5
2 6
3 7
4 8
;

addplot table
first second
1 5
2 6
3 7
4 8
;

addplot table
first second
1 5
2 6
3 7
4 8
;

addplot table
prova colonna
1 5
2 6
3 7
4 8
;

addplot table
prova colonna
1 5
2 6
3 7
4 8
;

addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture

enddocument


And its output is:



output



So the Blue-7 cycle list from color brewer is the closest that I could find, but the tonality is different and thus wrong.



Is there a way to obtain a 7-color cycle list similar to the XX-7 ones from colorbrewer but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.



I'm citing specifically color brewer because the luminosity difference between different color in the original Blue-7 palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.










share|improve this question

























    up vote
    3
    down vote

    favorite












    I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.



    The code is the following:



    documentclassarticle

    usepackagepgfplots
    usepgfplotslibrarycolorbrewer

    pgfplotssetcompat=newest

    definecolormyblueRGB95,145,166

    begindocument

    tikz path node[rectangle, fill=myblue,inner sep=1cm] ;

    begintikzpicture

    beginaxis[
    xbar stacked,
    cycle list/Blues-7, cycle list name=Blues-7,
    every axis plot/.style=fill
    ]

    addplot table
    first second
    1 5
    2 6
    3 7
    4 8
    ;

    addplot table
    first second
    1 5
    2 6
    3 7
    4 8
    ;

    addplot table
    first second
    1 5
    2 6
    3 7
    4 8
    ;

    addplot table
    first second
    1 5
    2 6
    3 7
    4 8
    ;

    addplot table
    prova colonna
    1 5
    2 6
    3 7
    4 8
    ;

    addplot table
    prova colonna
    1 5
    2 6
    3 7
    4 8
    ;

    addplot table
    prova colonna
    1 5
    2 6
    3 7
    4 8
    ;
    endaxis
    endtikzpicture

    enddocument


    And its output is:



    output



    So the Blue-7 cycle list from color brewer is the closest that I could find, but the tonality is different and thus wrong.



    Is there a way to obtain a 7-color cycle list similar to the XX-7 ones from colorbrewer but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.



    I'm citing specifically color brewer because the luminosity difference between different color in the original Blue-7 palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.










    share|improve this question























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.



      The code is the following:



      documentclassarticle

      usepackagepgfplots
      usepgfplotslibrarycolorbrewer

      pgfplotssetcompat=newest

      definecolormyblueRGB95,145,166

      begindocument

      tikz path node[rectangle, fill=myblue,inner sep=1cm] ;

      begintikzpicture

      beginaxis[
      xbar stacked,
      cycle list/Blues-7, cycle list name=Blues-7,
      every axis plot/.style=fill
      ]

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      prova colonna
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      prova colonna
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      prova colonna
      1 5
      2 6
      3 7
      4 8
      ;
      endaxis
      endtikzpicture

      enddocument


      And its output is:



      output



      So the Blue-7 cycle list from color brewer is the closest that I could find, but the tonality is different and thus wrong.



      Is there a way to obtain a 7-color cycle list similar to the XX-7 ones from colorbrewer but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.



      I'm citing specifically color brewer because the luminosity difference between different color in the original Blue-7 palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.










      share|improve this question













      I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.



      The code is the following:



      documentclassarticle

      usepackagepgfplots
      usepgfplotslibrarycolorbrewer

      pgfplotssetcompat=newest

      definecolormyblueRGB95,145,166

      begindocument

      tikz path node[rectangle, fill=myblue,inner sep=1cm] ;

      begintikzpicture

      beginaxis[
      xbar stacked,
      cycle list/Blues-7, cycle list name=Blues-7,
      every axis plot/.style=fill
      ]

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      first second
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      prova colonna
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      prova colonna
      1 5
      2 6
      3 7
      4 8
      ;

      addplot table
      prova colonna
      1 5
      2 6
      3 7
      4 8
      ;
      endaxis
      endtikzpicture

      enddocument


      And its output is:



      output



      So the Blue-7 cycle list from color brewer is the closest that I could find, but the tonality is different and thus wrong.



      Is there a way to obtain a 7-color cycle list similar to the XX-7 ones from colorbrewer but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.



      I'm citing specifically color brewer because the luminosity difference between different color in the original Blue-7 palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.







      pgfplots color






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 4 hours ago









      gigabytes

      1,3521018




      1,3521018




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You can always define your own things.



          documentclassarticle

          usepackagepgfplots
          usepgfplotslibrarycolorbrewer

          pgfplotssetcompat=newest

          definecolormyblueRGB95,145,166

          begindocument

          tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
          pgfplotscreateplotcyclelistmy blues%
          myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
          begintikzpicture

          beginaxis[
          xbar stacked,
          cycle list name=my blues,
          every axis plot/.style=fill,
          ]

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;
          endaxis
          endtikzpicture

          enddocument


          enter image description here



          Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).






          share|improve this answer






















          • Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
            – gigabytes
            2 hours ago










          • @gigabytes as for 1) good catch! and as for 2) sure, see my update.
            – marmot
            2 hours ago










          • Ah it was so easy! Thanks!
            – gigabytes
            2 hours ago










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          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',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2ftex.stackexchange.com%2fquestions%2f458640%2fhow-to-define-a-custom-pgf-color-palette-from-a-given-base-color%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          You can always define your own things.



          documentclassarticle

          usepackagepgfplots
          usepgfplotslibrarycolorbrewer

          pgfplotssetcompat=newest

          definecolormyblueRGB95,145,166

          begindocument

          tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
          pgfplotscreateplotcyclelistmy blues%
          myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
          begintikzpicture

          beginaxis[
          xbar stacked,
          cycle list name=my blues,
          every axis plot/.style=fill,
          ]

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;
          endaxis
          endtikzpicture

          enddocument


          enter image description here



          Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).






          share|improve this answer






















          • Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
            – gigabytes
            2 hours ago










          • @gigabytes as for 1) good catch! and as for 2) sure, see my update.
            – marmot
            2 hours ago










          • Ah it was so easy! Thanks!
            – gigabytes
            2 hours ago














          up vote
          3
          down vote



          accepted










          You can always define your own things.



          documentclassarticle

          usepackagepgfplots
          usepgfplotslibrarycolorbrewer

          pgfplotssetcompat=newest

          definecolormyblueRGB95,145,166

          begindocument

          tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
          pgfplotscreateplotcyclelistmy blues%
          myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
          begintikzpicture

          beginaxis[
          xbar stacked,
          cycle list name=my blues,
          every axis plot/.style=fill,
          ]

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;
          endaxis
          endtikzpicture

          enddocument


          enter image description here



          Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).






          share|improve this answer






















          • Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
            – gigabytes
            2 hours ago










          • @gigabytes as for 1) good catch! and as for 2) sure, see my update.
            – marmot
            2 hours ago










          • Ah it was so easy! Thanks!
            – gigabytes
            2 hours ago












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          You can always define your own things.



          documentclassarticle

          usepackagepgfplots
          usepgfplotslibrarycolorbrewer

          pgfplotssetcompat=newest

          definecolormyblueRGB95,145,166

          begindocument

          tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
          pgfplotscreateplotcyclelistmy blues%
          myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
          begintikzpicture

          beginaxis[
          xbar stacked,
          cycle list name=my blues,
          every axis plot/.style=fill,
          ]

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;
          endaxis
          endtikzpicture

          enddocument


          enter image description here



          Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).






          share|improve this answer














          You can always define your own things.



          documentclassarticle

          usepackagepgfplots
          usepgfplotslibrarycolorbrewer

          pgfplotssetcompat=newest

          definecolormyblueRGB95,145,166

          begindocument

          tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
          pgfplotscreateplotcyclelistmy blues%
          myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
          begintikzpicture

          beginaxis[
          xbar stacked,
          cycle list name=my blues,
          every axis plot/.style=fill,
          ]

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          first second
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;

          addplot table
          prova colonna
          1 5
          2 6
          3 7
          4 8
          ;
          endaxis
          endtikzpicture

          enddocument


          enter image description here



          Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 2 hours ago









          marmot

          72.1k477153




          72.1k477153











          • Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
            – gigabytes
            2 hours ago










          • @gigabytes as for 1) good catch! and as for 2) sure, see my update.
            – marmot
            2 hours ago










          • Ah it was so easy! Thanks!
            – gigabytes
            2 hours ago
















          • Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
            – gigabytes
            2 hours ago










          • @gigabytes as for 1) good catch! and as for 2) sure, see my update.
            – marmot
            2 hours ago










          • Ah it was so easy! Thanks!
            – gigabytes
            2 hours ago















          Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
          – gigabytes
          2 hours ago




          Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
          – gigabytes
          2 hours ago












          @gigabytes as for 1) good catch! and as for 2) sure, see my update.
          – marmot
          2 hours ago




          @gigabytes as for 1) good catch! and as for 2) sure, see my update.
          – marmot
          2 hours ago












          Ah it was so easy! Thanks!
          – gigabytes
          2 hours ago




          Ah it was so easy! Thanks!
          – gigabytes
          2 hours ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458640%2fhow-to-define-a-custom-pgf-color-palette-from-a-given-base-color%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          Installing NextGIS Connect into QGIS 3?

          One-line joke