Drawing color tiles using TikzDrawing a Cube Using TikzBeginner: Drawing using Tikzdrawing a plane and orthonormal system using tikzDrawing a flag in Tikz!Drawing arrows using tikz libraryTikZ: Drawing an arc from an intersection to an intersectiondrawing a picture using tikzDrawing a Cylinder on a plane using tikzDrawing similar picture with tikzDrawing parabola shape using Tikz

Referring to different instances of the same character in time travel

What does "it kind of works out" mean?

Book where the stars go black due to aliens stopping human observation collapsing quantum possibilities

Can fluent English speakers distinguish “steel”, “still” and “steal”?

If your plane is out-of-control, why does military training instruct releasing the joystick to neutralize controls?

Did any of the founding fathers anticipate Lysander Spooner's criticism of the constitution?

What are some examples of special things about Russian?

What's the maximum time an interrupt service routine can take to execute on atmega328p?

Cubic programming and beyond?

In Parshas Chukas, why is first mention of Parah Adumah "פָרָה" instead of "פָּרָה"?

Can I intentionally omit previous work experience or pretend it doesn't exist when applying for jobs?

Why would guns not work in the dungeon?

Are randomly-generated passwords starting with "a" less secure?

Why do Americans say "less than five people"?

How to achieve this rough borders and stippled illustration look?

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

How were Martello towers supposed to work?

How do Windows version numbers work?

Extract an attribute value from XML

What's an appropriate title for a person who deals with conflicts of an Empire?

Why isn't pressure filtration popular compared to vacuum filtration?

How can an advanced civilization forget how to manufacture its technology?

How can I deal with a player trying to insert real-world mythology into my homebrew setting?

Drawing color tiles using Tikz



Drawing color tiles using Tikz


Drawing a Cube Using TikzBeginner: Drawing using Tikzdrawing a plane and orthonormal system using tikzDrawing a flag in Tikz!Drawing arrows using tikz libraryTikZ: Drawing an arc from an intersection to an intersectiondrawing a picture using tikzDrawing a Cylinder on a plane using tikzDrawing similar picture with tikzDrawing parabola shape using Tikz






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















Hi good people of StackExchange, I want to draw a colored tile using Tikz. Roughly to represent the percentage three kind of things have in comparison to their total. The picture I want can be produced using the following.



usepackagetikz

newcommandcolorTiles[1]
begintikzpicture
draw[ultra thick](0,0) rectangle (1,0.5);
draw[fill = red](0, 0) rectangle (0.3, 0.5);
draw[fill = green](0.3, 0) rectangle (0.7, 0.5);
draw[fill = purple](0.7, 0) rectangle(1, 0.5);
endtikzpicture


colorTiles


enter image description here



Now my question is, how can I define the new command so that I don't have to adjust the proportions every time? Ideally, I just need to use



colorTile0.3, 0.5, 0.2


And I should get a tile with 30% red, 50% green, and 20% purple. I'm not familiar with Tikz so please help me.



Thanks in advance!










share|improve this question







New contributor



skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    4















    Hi good people of StackExchange, I want to draw a colored tile using Tikz. Roughly to represent the percentage three kind of things have in comparison to their total. The picture I want can be produced using the following.



    usepackagetikz

    newcommandcolorTiles[1]
    begintikzpicture
    draw[ultra thick](0,0) rectangle (1,0.5);
    draw[fill = red](0, 0) rectangle (0.3, 0.5);
    draw[fill = green](0.3, 0) rectangle (0.7, 0.5);
    draw[fill = purple](0.7, 0) rectangle(1, 0.5);
    endtikzpicture


    colorTiles


    enter image description here



    Now my question is, how can I define the new command so that I don't have to adjust the proportions every time? Ideally, I just need to use



    colorTile0.3, 0.5, 0.2


    And I should get a tile with 30% red, 50% green, and 20% purple. I'm not familiar with Tikz so please help me.



    Thanks in advance!










    share|improve this question







    New contributor



    skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      4












      4








      4








      Hi good people of StackExchange, I want to draw a colored tile using Tikz. Roughly to represent the percentage three kind of things have in comparison to their total. The picture I want can be produced using the following.



      usepackagetikz

      newcommandcolorTiles[1]
      begintikzpicture
      draw[ultra thick](0,0) rectangle (1,0.5);
      draw[fill = red](0, 0) rectangle (0.3, 0.5);
      draw[fill = green](0.3, 0) rectangle (0.7, 0.5);
      draw[fill = purple](0.7, 0) rectangle(1, 0.5);
      endtikzpicture


      colorTiles


      enter image description here



      Now my question is, how can I define the new command so that I don't have to adjust the proportions every time? Ideally, I just need to use



      colorTile0.3, 0.5, 0.2


      And I should get a tile with 30% red, 50% green, and 20% purple. I'm not familiar with Tikz so please help me.



      Thanks in advance!










      share|improve this question







      New contributor



      skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Hi good people of StackExchange, I want to draw a colored tile using Tikz. Roughly to represent the percentage three kind of things have in comparison to their total. The picture I want can be produced using the following.



      usepackagetikz

      newcommandcolorTiles[1]
      begintikzpicture
      draw[ultra thick](0,0) rectangle (1,0.5);
      draw[fill = red](0, 0) rectangle (0.3, 0.5);
      draw[fill = green](0.3, 0) rectangle (0.7, 0.5);
      draw[fill = purple](0.7, 0) rectangle(1, 0.5);
      endtikzpicture


      colorTiles


      enter image description here



      Now my question is, how can I define the new command so that I don't have to adjust the proportions every time? Ideally, I just need to use



      colorTile0.3, 0.5, 0.2


      And I should get a tile with 30% red, 50% green, and 20% purple. I'm not familiar with Tikz so please help me.



      Thanks in advance!







      tikz-pgf tikz-arrows technical-drawing tikz-graphdrawing






      share|improve this question







      New contributor



      skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      skyphantasyskyphantasy

      333 bronze badges




      333 bronze badges




      New contributor



      skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          7














          Welcome to TeX-SE! The following produces such bars. The syntax is as simple as



          piccolor tile=0.3, 0.5, 0.2;


          The colors are stored in a list and can be adjusted, as illustrated in the following example. The width is stored in a pgf key and can also be adjusted.



          documentclass[tikz,border=3.14mm]standalone
          begindocument
          begintikzpicture[pics/color tile/.style=code=
          path (0,0) coordinate (aux);
          foreach XX [count=YY starting from 0] in #1
          pgfmathsetmacromycolLstCols[YY]
          draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
          (aux) -- ++(XX,0) coordinate (aux);
          draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
          (aux,color tile/.cd,width/.initial=5mm]
          edefLstCols"red","green","purple","blue" %< adjust and extent if needed
          path piccolor tile=0.3, 0.5, 0.2 (3,0) piccolor tile=0.3,0.6,0.4, 0.5;
          edefLstCols"orange","purple","yellow","red","blue" %< adjusted and extended list
          path (1,-2) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
          tikzsetcolor tile/width=1cm
          path (1,-4) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
          endtikzpicture
          enddocument


          enter image description here



          As for your comment on a command: here is a proposal.



          documentclassarticle
          usepackagetikz
          tikzsetpics/color tile/.style=code=
          edefLstColspgfkeysvalueof/tikz/color tile/colors
          path (0,0) coordinate (aux);
          foreach XX [count=YY starting from 0] in #1
          pgfmathsetmacromycolLstCols[YY]
          draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
          (aux) -- ++(XX,0) coordinate (aux);
          draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
          (aux,color tile/.cd,width/.initial=1em,
          colors/.initial="red","green","purple","blue"
          newcommandColorTile[2][]tikzpic[color tile/.cd,#1]color tile=#2;
          begindocument
          begintabularll
          ColorTile0.3, 0.5, 0.2 & ABC \
          ColorTile0.1, 0.2, 0.7 & UVW \
          ColorTile[colors="red","green","blue"]0.3, 0.5, 0.2 & XYZ\
          endtabular
          enddocument


          enter image description here






          share|improve this answer

























          • P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

            – marmot
            7 hours ago












          • Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

            – skyphantasy
            5 hours ago











          • @skyphantasy Of course, I added a proposal.

            – marmot
            2 hours ago


















          1














          Answering this just in case someone would need it:



          newcommandcolorTiles[3]
          begintikzpicture
          draw[ultra thick](0,0) rectangle (2,0.5);
          draw[fill = red](0, 0) rectangle (#1 * 2, 0.5);
          draw[fill = green](#1 * 2, 0) rectangle (#2 * 2 + #1 * 2, 0.5);
          draw[fill = purple](#2 * 2 + #1 * 2, 0) rectangle(#3 * 2 + #2 * 2 + #1 * 2, 0.5);
          draw[fill = gray](#3 * 2 + #2 * 2 + #1 * 2, 0) rectangle(2, 0.5);
          endtikzpicture



          Then we can put colorTiles0.20.50.1 inline.






          share|improve this answer








          New contributor



          skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





















            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',
            autoActivateHeartbeat: false,
            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
            );



            );






            skyphantasy is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499549%2fdrawing-color-tiles-using-tikz%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









            7














            Welcome to TeX-SE! The following produces such bars. The syntax is as simple as



            piccolor tile=0.3, 0.5, 0.2;


            The colors are stored in a list and can be adjusted, as illustrated in the following example. The width is stored in a pgf key and can also be adjusted.



            documentclass[tikz,border=3.14mm]standalone
            begindocument
            begintikzpicture[pics/color tile/.style=code=
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=5mm]
            edefLstCols"red","green","purple","blue" %< adjust and extent if needed
            path piccolor tile=0.3, 0.5, 0.2 (3,0) piccolor tile=0.3,0.6,0.4, 0.5;
            edefLstCols"orange","purple","yellow","red","blue" %< adjusted and extended list
            path (1,-2) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            tikzsetcolor tile/width=1cm
            path (1,-4) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            endtikzpicture
            enddocument


            enter image description here



            As for your comment on a command: here is a proposal.



            documentclassarticle
            usepackagetikz
            tikzsetpics/color tile/.style=code=
            edefLstColspgfkeysvalueof/tikz/color tile/colors
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=1em,
            colors/.initial="red","green","purple","blue"
            newcommandColorTile[2][]tikzpic[color tile/.cd,#1]color tile=#2;
            begindocument
            begintabularll
            ColorTile0.3, 0.5, 0.2 & ABC \
            ColorTile0.1, 0.2, 0.7 & UVW \
            ColorTile[colors="red","green","blue"]0.3, 0.5, 0.2 & XYZ\
            endtabular
            enddocument


            enter image description here






            share|improve this answer

























            • P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

              – marmot
              7 hours ago












            • Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

              – skyphantasy
              5 hours ago











            • @skyphantasy Of course, I added a proposal.

              – marmot
              2 hours ago















            7














            Welcome to TeX-SE! The following produces such bars. The syntax is as simple as



            piccolor tile=0.3, 0.5, 0.2;


            The colors are stored in a list and can be adjusted, as illustrated in the following example. The width is stored in a pgf key and can also be adjusted.



            documentclass[tikz,border=3.14mm]standalone
            begindocument
            begintikzpicture[pics/color tile/.style=code=
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=5mm]
            edefLstCols"red","green","purple","blue" %< adjust and extent if needed
            path piccolor tile=0.3, 0.5, 0.2 (3,0) piccolor tile=0.3,0.6,0.4, 0.5;
            edefLstCols"orange","purple","yellow","red","blue" %< adjusted and extended list
            path (1,-2) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            tikzsetcolor tile/width=1cm
            path (1,-4) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            endtikzpicture
            enddocument


            enter image description here



            As for your comment on a command: here is a proposal.



            documentclassarticle
            usepackagetikz
            tikzsetpics/color tile/.style=code=
            edefLstColspgfkeysvalueof/tikz/color tile/colors
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=1em,
            colors/.initial="red","green","purple","blue"
            newcommandColorTile[2][]tikzpic[color tile/.cd,#1]color tile=#2;
            begindocument
            begintabularll
            ColorTile0.3, 0.5, 0.2 & ABC \
            ColorTile0.1, 0.2, 0.7 & UVW \
            ColorTile[colors="red","green","blue"]0.3, 0.5, 0.2 & XYZ\
            endtabular
            enddocument


            enter image description here






            share|improve this answer

























            • P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

              – marmot
              7 hours ago












            • Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

              – skyphantasy
              5 hours ago











            • @skyphantasy Of course, I added a proposal.

              – marmot
              2 hours ago













            7












            7








            7







            Welcome to TeX-SE! The following produces such bars. The syntax is as simple as



            piccolor tile=0.3, 0.5, 0.2;


            The colors are stored in a list and can be adjusted, as illustrated in the following example. The width is stored in a pgf key and can also be adjusted.



            documentclass[tikz,border=3.14mm]standalone
            begindocument
            begintikzpicture[pics/color tile/.style=code=
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=5mm]
            edefLstCols"red","green","purple","blue" %< adjust and extent if needed
            path piccolor tile=0.3, 0.5, 0.2 (3,0) piccolor tile=0.3,0.6,0.4, 0.5;
            edefLstCols"orange","purple","yellow","red","blue" %< adjusted and extended list
            path (1,-2) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            tikzsetcolor tile/width=1cm
            path (1,-4) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            endtikzpicture
            enddocument


            enter image description here



            As for your comment on a command: here is a proposal.



            documentclassarticle
            usepackagetikz
            tikzsetpics/color tile/.style=code=
            edefLstColspgfkeysvalueof/tikz/color tile/colors
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=1em,
            colors/.initial="red","green","purple","blue"
            newcommandColorTile[2][]tikzpic[color tile/.cd,#1]color tile=#2;
            begindocument
            begintabularll
            ColorTile0.3, 0.5, 0.2 & ABC \
            ColorTile0.1, 0.2, 0.7 & UVW \
            ColorTile[colors="red","green","blue"]0.3, 0.5, 0.2 & XYZ\
            endtabular
            enddocument


            enter image description here






            share|improve this answer















            Welcome to TeX-SE! The following produces such bars. The syntax is as simple as



            piccolor tile=0.3, 0.5, 0.2;


            The colors are stored in a list and can be adjusted, as illustrated in the following example. The width is stored in a pgf key and can also be adjusted.



            documentclass[tikz,border=3.14mm]standalone
            begindocument
            begintikzpicture[pics/color tile/.style=code=
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=5mm]
            edefLstCols"red","green","purple","blue" %< adjust and extent if needed
            path piccolor tile=0.3, 0.5, 0.2 (3,0) piccolor tile=0.3,0.6,0.4, 0.5;
            edefLstCols"orange","purple","yellow","red","blue" %< adjusted and extended list
            path (1,-2) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            tikzsetcolor tile/width=1cm
            path (1,-4) piccolor tile=0.3,0.6,0.4, 0.5,0.8;
            endtikzpicture
            enddocument


            enter image description here



            As for your comment on a command: here is a proposal.



            documentclassarticle
            usepackagetikz
            tikzsetpics/color tile/.style=code=
            edefLstColspgfkeysvalueof/tikz/color tile/colors
            path (0,0) coordinate (aux);
            foreach XX [count=YY starting from 0] in #1
            pgfmathsetmacromycolLstCols[YY]
            draw[line width=pgfkeysvalueof/tikz/color tile/width,color=mycol]
            (aux) -- ++(XX,0) coordinate (aux);
            draw[thick] (0,-pgfkeysvalueof/tikz/color tile/width/2) rectangle
            (aux,color tile/.cd,width/.initial=1em,
            colors/.initial="red","green","purple","blue"
            newcommandColorTile[2][]tikzpic[color tile/.cd,#1]color tile=#2;
            begindocument
            begintabularll
            ColorTile0.3, 0.5, 0.2 & ABC \
            ColorTile0.1, 0.2, 0.7 & UVW \
            ColorTile[colors="red","green","blue"]0.3, 0.5, 0.2 & XYZ\
            endtabular
            enddocument


            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 2 hours ago

























            answered 7 hours ago









            marmotmarmot

            144k6 gold badges187 silver badges346 bronze badges




            144k6 gold badges187 silver badges346 bronze badges












            • P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

              – marmot
              7 hours ago












            • Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

              – skyphantasy
              5 hours ago











            • @skyphantasy Of course, I added a proposal.

              – marmot
              2 hours ago

















            • P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

              – marmot
              7 hours ago












            • Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

              – skyphantasy
              5 hours ago











            • @skyphantasy Of course, I added a proposal.

              – marmot
              2 hours ago
















            P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

            – marmot
            7 hours ago






            P.S. If you want to "stretch" the tile, use xscale, e.g. path pic[xscale=5]color tile=0.3,0.2,0.5;. You can also rotate it etc.

            – marmot
            7 hours ago














            Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

            – skyphantasy
            5 hours ago





            Thanks a lot for the answer! Is it possible to use this inline with texts? In fact I was going to put these in tables. Can your answer be adapted for that? Thanks again!

            – skyphantasy
            5 hours ago













            @skyphantasy Of course, I added a proposal.

            – marmot
            2 hours ago





            @skyphantasy Of course, I added a proposal.

            – marmot
            2 hours ago













            1














            Answering this just in case someone would need it:



            newcommandcolorTiles[3]
            begintikzpicture
            draw[ultra thick](0,0) rectangle (2,0.5);
            draw[fill = red](0, 0) rectangle (#1 * 2, 0.5);
            draw[fill = green](#1 * 2, 0) rectangle (#2 * 2 + #1 * 2, 0.5);
            draw[fill = purple](#2 * 2 + #1 * 2, 0) rectangle(#3 * 2 + #2 * 2 + #1 * 2, 0.5);
            draw[fill = gray](#3 * 2 + #2 * 2 + #1 * 2, 0) rectangle(2, 0.5);
            endtikzpicture



            Then we can put colorTiles0.20.50.1 inline.






            share|improve this answer








            New contributor



            skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.























              1














              Answering this just in case someone would need it:



              newcommandcolorTiles[3]
              begintikzpicture
              draw[ultra thick](0,0) rectangle (2,0.5);
              draw[fill = red](0, 0) rectangle (#1 * 2, 0.5);
              draw[fill = green](#1 * 2, 0) rectangle (#2 * 2 + #1 * 2, 0.5);
              draw[fill = purple](#2 * 2 + #1 * 2, 0) rectangle(#3 * 2 + #2 * 2 + #1 * 2, 0.5);
              draw[fill = gray](#3 * 2 + #2 * 2 + #1 * 2, 0) rectangle(2, 0.5);
              endtikzpicture



              Then we can put colorTiles0.20.50.1 inline.






              share|improve this answer








              New contributor



              skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                1












                1








                1







                Answering this just in case someone would need it:



                newcommandcolorTiles[3]
                begintikzpicture
                draw[ultra thick](0,0) rectangle (2,0.5);
                draw[fill = red](0, 0) rectangle (#1 * 2, 0.5);
                draw[fill = green](#1 * 2, 0) rectangle (#2 * 2 + #1 * 2, 0.5);
                draw[fill = purple](#2 * 2 + #1 * 2, 0) rectangle(#3 * 2 + #2 * 2 + #1 * 2, 0.5);
                draw[fill = gray](#3 * 2 + #2 * 2 + #1 * 2, 0) rectangle(2, 0.5);
                endtikzpicture



                Then we can put colorTiles0.20.50.1 inline.






                share|improve this answer








                New contributor



                skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                Answering this just in case someone would need it:



                newcommandcolorTiles[3]
                begintikzpicture
                draw[ultra thick](0,0) rectangle (2,0.5);
                draw[fill = red](0, 0) rectangle (#1 * 2, 0.5);
                draw[fill = green](#1 * 2, 0) rectangle (#2 * 2 + #1 * 2, 0.5);
                draw[fill = purple](#2 * 2 + #1 * 2, 0) rectangle(#3 * 2 + #2 * 2 + #1 * 2, 0.5);
                draw[fill = gray](#3 * 2 + #2 * 2 + #1 * 2, 0) rectangle(2, 0.5);
                endtikzpicture



                Then we can put colorTiles0.20.50.1 inline.







                share|improve this answer








                New contributor



                skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                share|improve this answer



                share|improve this answer






                New contributor



                skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                answered 4 hours ago









                skyphantasyskyphantasy

                333 bronze badges




                333 bronze badges




                New contributor



                skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.




                New contributor




                skyphantasy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                    skyphantasy is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    skyphantasy is a new contributor. Be nice, and check out our Code of Conduct.












                    skyphantasy is a new contributor. Be nice, and check out our Code of Conduct.











                    skyphantasy is a new contributor. Be nice, and check out our Code of Conduct.














                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • 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%2ftex.stackexchange.com%2fquestions%2f499549%2fdrawing-color-tiles-using-tikz%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

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її