tikz dimension too large drawing a color wheel

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











up vote
9
down vote

favorite
1












I drew a few years ago a colored wheel for my students. I'm happy with.



enter image description here



But the code was ugly because i didn't use foreach command, so it's big and messy...As an example:



path[postaction=decoration=
text along path,
text= jaune-vert,
text align=center,
reverse path
,
decorate] (45:4.6) arc (45:75:4.6);


for each color...not the most efficient way to do it!



This is my new code (more elegant solution) only for the color names



documentclass[10pt,a4paper]article
usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc

usepackagetikz
usetikzlibrarycalc
usetikzlibraryarrows,decorations.text

begindocument

begintikzpicture
edefang0
foreach x/text in 0/orange, 30/jaune, 60/jaune-vert, 90/vert, 120/bleu-vert, 150/cyan, 180/bleu roi

pgfmathparseang + 15
xdefangpgfmathresult
path[postaction=decoration=
text along path,
text= text,
text align=center,
reverse path,
decorate](-15+x:4.6) arc (-15+x :ang :4.6);

endtikzpicture

enddocument


I have a dimenssion too large error. Thank you for your help!



Best regards.










share|improve this question



















  • 3




    I think your math is wrong. For x=60 you have an arc definition of (45:4.6) arc (45:45:4.6);.
    – Ulrike Fischer
    Aug 16 at 16:30






  • 1




    Just listen to @UlrikeFischer and use arc (-15+x :-15+x+ang :4.6);
    – marmot
    Aug 16 at 16:54














up vote
9
down vote

favorite
1












I drew a few years ago a colored wheel for my students. I'm happy with.



enter image description here



But the code was ugly because i didn't use foreach command, so it's big and messy...As an example:



path[postaction=decoration=
text along path,
text= jaune-vert,
text align=center,
reverse path
,
decorate] (45:4.6) arc (45:75:4.6);


for each color...not the most efficient way to do it!



This is my new code (more elegant solution) only for the color names



documentclass[10pt,a4paper]article
usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc

usepackagetikz
usetikzlibrarycalc
usetikzlibraryarrows,decorations.text

begindocument

begintikzpicture
edefang0
foreach x/text in 0/orange, 30/jaune, 60/jaune-vert, 90/vert, 120/bleu-vert, 150/cyan, 180/bleu roi

pgfmathparseang + 15
xdefangpgfmathresult
path[postaction=decoration=
text along path,
text= text,
text align=center,
reverse path,
decorate](-15+x:4.6) arc (-15+x :ang :4.6);

endtikzpicture

enddocument


I have a dimenssion too large error. Thank you for your help!



Best regards.










share|improve this question



















  • 3




    I think your math is wrong. For x=60 you have an arc definition of (45:4.6) arc (45:45:4.6);.
    – Ulrike Fischer
    Aug 16 at 16:30






  • 1




    Just listen to @UlrikeFischer and use arc (-15+x :-15+x+ang :4.6);
    – marmot
    Aug 16 at 16:54












up vote
9
down vote

favorite
1









up vote
9
down vote

favorite
1






1





I drew a few years ago a colored wheel for my students. I'm happy with.



enter image description here



But the code was ugly because i didn't use foreach command, so it's big and messy...As an example:



path[postaction=decoration=
text along path,
text= jaune-vert,
text align=center,
reverse path
,
decorate] (45:4.6) arc (45:75:4.6);


for each color...not the most efficient way to do it!



This is my new code (more elegant solution) only for the color names



documentclass[10pt,a4paper]article
usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc

usepackagetikz
usetikzlibrarycalc
usetikzlibraryarrows,decorations.text

begindocument

begintikzpicture
edefang0
foreach x/text in 0/orange, 30/jaune, 60/jaune-vert, 90/vert, 120/bleu-vert, 150/cyan, 180/bleu roi

pgfmathparseang + 15
xdefangpgfmathresult
path[postaction=decoration=
text along path,
text= text,
text align=center,
reverse path,
decorate](-15+x:4.6) arc (-15+x :ang :4.6);

endtikzpicture

enddocument


I have a dimenssion too large error. Thank you for your help!



Best regards.










share|improve this question















I drew a few years ago a colored wheel for my students. I'm happy with.



enter image description here



But the code was ugly because i didn't use foreach command, so it's big and messy...As an example:



path[postaction=decoration=
text along path,
text= jaune-vert,
text align=center,
reverse path
,
decorate] (45:4.6) arc (45:75:4.6);


for each color...not the most efficient way to do it!



This is my new code (more elegant solution) only for the color names



documentclass[10pt,a4paper]article
usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc

usepackagetikz
usetikzlibrarycalc
usetikzlibraryarrows,decorations.text

begindocument

begintikzpicture
edefang0
foreach x/text in 0/orange, 30/jaune, 60/jaune-vert, 90/vert, 120/bleu-vert, 150/cyan, 180/bleu roi

pgfmathparseang + 15
xdefangpgfmathresult
path[postaction=decoration=
text along path,
text= text,
text align=center,
reverse path,
decorate](-15+x:4.6) arc (-15+x :ang :4.6);

endtikzpicture

enddocument


I have a dimenssion too large error. Thank you for your help!



Best regards.







tikz-pgf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 17 at 11:33









Rmano

6,96121446




6,96121446










asked Aug 16 at 15:43









Prof de Physique-Chimie

1056




1056







  • 3




    I think your math is wrong. For x=60 you have an arc definition of (45:4.6) arc (45:45:4.6);.
    – Ulrike Fischer
    Aug 16 at 16:30






  • 1




    Just listen to @UlrikeFischer and use arc (-15+x :-15+x+ang :4.6);
    – marmot
    Aug 16 at 16:54












  • 3




    I think your math is wrong. For x=60 you have an arc definition of (45:4.6) arc (45:45:4.6);.
    – Ulrike Fischer
    Aug 16 at 16:30






  • 1




    Just listen to @UlrikeFischer and use arc (-15+x :-15+x+ang :4.6);
    – marmot
    Aug 16 at 16:54







3




3




I think your math is wrong. For x=60 you have an arc definition of (45:4.6) arc (45:45:4.6);.
– Ulrike Fischer
Aug 16 at 16:30




I think your math is wrong. For x=60 you have an arc definition of (45:4.6) arc (45:45:4.6);.
– Ulrike Fischer
Aug 16 at 16:30




1




1




Just listen to @UlrikeFischer and use arc (-15+x :-15+x+ang :4.6);
– marmot
Aug 16 at 16:54




Just listen to @UlrikeFischer and use arc (-15+x :-15+x+ang :4.6);
– marmot
Aug 16 at 16:54










5 Answers
5






active

oldest

votes

















up vote
10
down vote



accepted










edit:
now from your answer (you should first edit your question and add missing in information), i can complete my answer:



enter image description here



 documentclass[10pt,a4paper]article
usepackage[french]babel
usepackage[T1]fontenc

usepackage[dvipsnames]xcolor
usepackagetikz
usetikzlibraryarrows, calc, decorations.text

begindocument
begintikzpicture
foreach x/t [count=xx from 0] in %
orange/orange, jaune/yellow, jaune-vert/LimeGreen, vert/green,
bleu-vert/SeaGreen, cyan/Cyan, bleu-rois/NavyBlue, bleu/blue, violet/Violet, magenta/magenta, rouge-rosé/RubineRed, rouge/red

pgfmathsetmacroangle30*xx
path[decoration=text along path,
text=x,
text align=center,
reverse path,
postaction=decorate,
]
ifnumxx<7
(angle-15:4) arc (angle-15:angle+15:4);
else
(angle+15:4.2) arc (angle+15:angle-15:4.2);
fi
draw[double=t, semithick,
double distance=5mm] (angle-15:3.6) arc (angle-15:angle+15:3.6);
draw[semithick] (angle-15:3.35) -- (angle-15:3.85);
draw[->] (0,0) -- (angle:3);

endtikzpicture
enddocument





share|improve this answer






















  • hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
    – Prof de Physique-Chimie
    Aug 16 at 20:30










  • I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
    – AndréC
    Aug 16 at 20:55










  • @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
    – Zarko
    Aug 16 at 22:21










  • Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
    – AndréC
    Aug 16 at 22:35










  • @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
    – Zarko
    Aug 16 at 22:53

















up vote
6
down vote













Just for fun and inspired by the example and the answers an arrangement through a definition with parameters:



ColorWeel(<coordinate>)[<radius>][<pseudo-sharpness>]Color_Name/Graphicx_name, Color_name/Color1!value(0-100)!color2, ...


RESULT:
enter image description here



MWE:



% By J. Leon V. Share as Beerware philosophy
documentclass[border=20pt]standalone
usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackagemakeidx
usepackagegraphicx
usepackagelmodern
usepackagekpfonts
usepackage[dvipsnames]xcolor
usepackagetikz
usetikzlibrarydecorations.text, arrows.meta


usetikzlibrarycalc
begindocument
begintikzpicture[
% Environment Cfg
>=Stealth[inset=0pt,length=10pt]
]

%Variables: 1:Position 2:Radio 3:pseudo sharpsness 4: Name/Color array
defColorWeel(#1)[#2][#3]#4%
beginscope[shift=(#1)]
%Drawing features separations.
foreach elements [count=n] in #4
pgfmathparseint(360/n)
edefAnglepgfmathresult
foreach text/color [count=i from 0] in #4
draw[fill=color,thick](Angle*i:#2)
arc (Angle*i:Angle*i+Angle:#2)
-- (Angle*i+Angle:#2-0.5cm) arc (Angle*i+Angle:Angle*i:#2-0.5cm) -- cycle;
pgfmathparseint(Angle*i)
ifnumpgfmathresult<180
path[decoration=text along path,raise=-4pt,text=text,text align=center,reverse path,decorate]
(Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
fi
ifnumpgfmathresult>179
path[decoration=text along path,text=text,text align=center,decorate]
(Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
fi

clip (0,0) circle (#2-0.5cm);
foreach text/color [count=j from 0] in #4
foreach k in 1,2,...,20
path[fill=color, opacity=#3](Angle*j+Angle/2: #2-0.7cm) circle (k*0.2);

draw[thick, ->] (0,0) -- (Angle*j+Angle/2: #2-1.2cm);

endscope


ColorWeel(0,0)[5cm][0.05]
Orange/orange,
jaune/yellow,
jaune-vert/lime,
vert/green,
bleu-vert/SeaGreen,
cyan/Cyan,
bleu roi/NavyBlue,
bleu/blue,
violet/violet,
magenta/magenta,
rouge-ros'e/RubineRed,
rouge/red

ColorWeel(11,0)[3.5cm][0.08]
Blue/blue,
Red/red,
Yellow/yellow

ColorWeel(7,-10)[4cm][0.08]
black/black,
white/white,
green-60-black/green!60!black,
blue-50-green/blue!50!green,
blue-50-red/blue!50!red

endtikzpicture
enddocument





share|improve this answer




















  • That's beautiful!
    – AndréC
    Aug 17 at 6:18

















up vote
4
down vote













With the code from your answer, I wrote the entire code. I kept the structure of your code with 3 foreach loops that fits well here.



In each foreach loop, instead of incrementing two variables, it is also simple to count the number of colors and calculate the angles.



To make the code easy to read and understand, I spelled out the variable names (and in French): couleur for colour, angle, n for number.



I put the acute accent of the rouge-rosé color between braces because otherwise I have an error at compilation and this even with the tikz babel library usetikzlibrarybabel



The inputenc package is now included in LaTeX, it is no longer necessary to load it, so I commented on it. %usepackage[utf8]inputenc



to put the same margins with the geometry package, just write usepackage[margin=2cm]geometry



documentclass[10pt,a4paper]article
%usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc
usepackageamsmath
usepackageamsfonts
usepackageamssymb
usepackagemakeidx
usepackagegraphicx
usepackagelmodern
usepackagekpfonts
usepackage[margin=2cm]geometry

usepackage[dvipsnames]xcolor
usepackagetikz
usetikzlibrarycalc
usetikzlibraryarrows,decorations.text
usetikzlibrarybabel

begindocument
begintikzpicture
%draw names
foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, jaune,jaune-vert ,vert,bleu-vert,cyan,bleu-roi

path[decoration=
text along path,
text=couleur,
text align=center,
reverse path,
postaction=decorate]
(angle : 4.1) arc (angle :angle + 30 : 4.1);


%% draw names
foreach couleur [count=n from 7,evaluate= n as angle using n*30-15] in bleu, violet, magenta, rouge-rosé, rouge

path[decoration=
text along path,
text=couleur,
text align=center,
postaction=decorate] (angle:4.3) arc (angle :angle+30:4.3);


foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, yellow,LimeGreen,green, SeaGreen, Cyan, NavyBlue, blue, Violet, magenta, RubineRed, red

draw[double=couleur,
semithick,
double distance=5mm] (angle:3.6) arc (angle:angle+30:3.6);
draw[->,thick] (0,0) -- (angle-15:3);

endtikzpicture
enddocument


couleurs






share|improve this answer


















  • 1




    This is a nice approach. I wasn't familiar with the count/evaluate construct.
    – Derek
    Aug 16 at 20:38






  • 2




    @Derek Learning tikz is a very long job that never ends...
    – AndréC
    Aug 16 at 20:48

















up vote
3
down vote













I would probably start with something like this:



documentclass[10pt,a4paper]article
usepackage[utf8]inputenc
usepackage[french]babel
usepackage[T1]fontenc

usepackagetikz
usetikzlibrarycalc
usetikzlibraryarrows,decorations.text

begindocument

begintikzpicture

foreach x/text in
0/orange, 1/jaune, 2/jaune-vert, 3/vert, 4/bleu-vert, 5/cyan, 6/bleu

path[postaction=decoration=text along path, text=text,
text align=center, reverse path, decorate]
(30*x - 15:6.6) arc (30*x - 15:30*x + 15:6.6);


endtikzpicture
enddocument





share|improve this answer



























    up vote
    3
    down vote













    I red carefully all your answers, and i think i got it!



    documentclass[10pt,a4paper]article
    usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]geometry

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarycalc
    usetikzlibraryarrows,decorations.text

    begindocument
    begintikzpicture
    %draw names
    foreach x/text in 0/orange, 30/jaune, 60/jaune-vert , 90/vert, 120/bleu-vert, 150/cyan, 180/bleu-rois

    path[postaction=decoration=
    text along path,
    text= text,
    text align=center,
    reverse path
    ,
    decorate] (-15+x:4.3) arc (-15+x :15+x:4.3);

    % draw names
    foreach x/text in 210/bleu, 240/violet, 270/magenta, 300/rouge-rosé, 330/rouge

    path[postaction=decoration=
    text along path,
    text= text,
    text align=center,
    ,decorate] (-15+x:4.5) arc (-15+x :15+x:4.5);

    %draw circles and color
    foreach x/text in 0/orange, 30/yellow, 60/LimeGreen, 90/green, 120/SeaGreen, 150/Cyan, 180/NavyBlue, 210/blue, 240/Violet, 270/magenta, 300/RubineRed, 330/red

    draw [fill=text](15+x:4)-- (15+x:3.5) arc(15+x:-15+x:3.5)--(-15+x:4)arc (-15+x:15+x:4)--cycle;

    foreach x in 0, 30, ..., 150
    draw[<->, thick, black, rotate=x] (0,3)--(0,-3);
    endtikzpicture


    enddocument


    enter image description here






    share|improve this answer
















    • 1




      which answer you read? with yours here are now four :-)
      – Zarko
      Aug 16 at 18:05










    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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f446301%2ftikz-dimension-too-large-drawing-a-color-wheel%23new-answer', 'question_page');

    );

    Post as a guest






























    5 Answers
    5






    active

    oldest

    votes








    5 Answers
    5






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    10
    down vote



    accepted










    edit:
    now from your answer (you should first edit your question and add missing in information), i can complete my answer:



    enter image description here



     documentclass[10pt,a4paper]article
    usepackage[french]babel
    usepackage[T1]fontenc

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibraryarrows, calc, decorations.text

    begindocument
    begintikzpicture
    foreach x/t [count=xx from 0] in %
    orange/orange, jaune/yellow, jaune-vert/LimeGreen, vert/green,
    bleu-vert/SeaGreen, cyan/Cyan, bleu-rois/NavyBlue, bleu/blue, violet/Violet, magenta/magenta, rouge-rosé/RubineRed, rouge/red

    pgfmathsetmacroangle30*xx
    path[decoration=text along path,
    text=x,
    text align=center,
    reverse path,
    postaction=decorate,
    ]
    ifnumxx<7
    (angle-15:4) arc (angle-15:angle+15:4);
    else
    (angle+15:4.2) arc (angle+15:angle-15:4.2);
    fi
    draw[double=t, semithick,
    double distance=5mm] (angle-15:3.6) arc (angle-15:angle+15:3.6);
    draw[semithick] (angle-15:3.35) -- (angle-15:3.85);
    draw[->] (0,0) -- (angle:3);

    endtikzpicture
    enddocument





    share|improve this answer






















    • hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
      – Prof de Physique-Chimie
      Aug 16 at 20:30










    • I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
      – AndréC
      Aug 16 at 20:55










    • @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
      – Zarko
      Aug 16 at 22:21










    • Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
      – AndréC
      Aug 16 at 22:35










    • @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
      – Zarko
      Aug 16 at 22:53














    up vote
    10
    down vote



    accepted










    edit:
    now from your answer (you should first edit your question and add missing in information), i can complete my answer:



    enter image description here



     documentclass[10pt,a4paper]article
    usepackage[french]babel
    usepackage[T1]fontenc

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibraryarrows, calc, decorations.text

    begindocument
    begintikzpicture
    foreach x/t [count=xx from 0] in %
    orange/orange, jaune/yellow, jaune-vert/LimeGreen, vert/green,
    bleu-vert/SeaGreen, cyan/Cyan, bleu-rois/NavyBlue, bleu/blue, violet/Violet, magenta/magenta, rouge-rosé/RubineRed, rouge/red

    pgfmathsetmacroangle30*xx
    path[decoration=text along path,
    text=x,
    text align=center,
    reverse path,
    postaction=decorate,
    ]
    ifnumxx<7
    (angle-15:4) arc (angle-15:angle+15:4);
    else
    (angle+15:4.2) arc (angle+15:angle-15:4.2);
    fi
    draw[double=t, semithick,
    double distance=5mm] (angle-15:3.6) arc (angle-15:angle+15:3.6);
    draw[semithick] (angle-15:3.35) -- (angle-15:3.85);
    draw[->] (0,0) -- (angle:3);

    endtikzpicture
    enddocument





    share|improve this answer






















    • hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
      – Prof de Physique-Chimie
      Aug 16 at 20:30










    • I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
      – AndréC
      Aug 16 at 20:55










    • @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
      – Zarko
      Aug 16 at 22:21










    • Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
      – AndréC
      Aug 16 at 22:35










    • @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
      – Zarko
      Aug 16 at 22:53












    up vote
    10
    down vote



    accepted







    up vote
    10
    down vote



    accepted






    edit:
    now from your answer (you should first edit your question and add missing in information), i can complete my answer:



    enter image description here



     documentclass[10pt,a4paper]article
    usepackage[french]babel
    usepackage[T1]fontenc

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibraryarrows, calc, decorations.text

    begindocument
    begintikzpicture
    foreach x/t [count=xx from 0] in %
    orange/orange, jaune/yellow, jaune-vert/LimeGreen, vert/green,
    bleu-vert/SeaGreen, cyan/Cyan, bleu-rois/NavyBlue, bleu/blue, violet/Violet, magenta/magenta, rouge-rosé/RubineRed, rouge/red

    pgfmathsetmacroangle30*xx
    path[decoration=text along path,
    text=x,
    text align=center,
    reverse path,
    postaction=decorate,
    ]
    ifnumxx<7
    (angle-15:4) arc (angle-15:angle+15:4);
    else
    (angle+15:4.2) arc (angle+15:angle-15:4.2);
    fi
    draw[double=t, semithick,
    double distance=5mm] (angle-15:3.6) arc (angle-15:angle+15:3.6);
    draw[semithick] (angle-15:3.35) -- (angle-15:3.85);
    draw[->] (0,0) -- (angle:3);

    endtikzpicture
    enddocument





    share|improve this answer














    edit:
    now from your answer (you should first edit your question and add missing in information), i can complete my answer:



    enter image description here



     documentclass[10pt,a4paper]article
    usepackage[french]babel
    usepackage[T1]fontenc

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibraryarrows, calc, decorations.text

    begindocument
    begintikzpicture
    foreach x/t [count=xx from 0] in %
    orange/orange, jaune/yellow, jaune-vert/LimeGreen, vert/green,
    bleu-vert/SeaGreen, cyan/Cyan, bleu-rois/NavyBlue, bleu/blue, violet/Violet, magenta/magenta, rouge-rosé/RubineRed, rouge/red

    pgfmathsetmacroangle30*xx
    path[decoration=text along path,
    text=x,
    text align=center,
    reverse path,
    postaction=decorate,
    ]
    ifnumxx<7
    (angle-15:4) arc (angle-15:angle+15:4);
    else
    (angle+15:4.2) arc (angle+15:angle-15:4.2);
    fi
    draw[double=t, semithick,
    double distance=5mm] (angle-15:3.6) arc (angle-15:angle+15:3.6);
    draw[semithick] (angle-15:3.35) -- (angle-15:3.85);
    draw[->] (0,0) -- (angle:3);

    endtikzpicture
    enddocument






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 16 at 22:52

























    answered Aug 16 at 16:49









    Zarko

    113k861150




    113k861150











    • hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
      – Prof de Physique-Chimie
      Aug 16 at 20:30










    • I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
      – AndréC
      Aug 16 at 20:55










    • @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
      – Zarko
      Aug 16 at 22:21










    • Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
      – AndréC
      Aug 16 at 22:35










    • @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
      – Zarko
      Aug 16 at 22:53
















    • hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
      – Prof de Physique-Chimie
      Aug 16 at 20:30










    • I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
      – AndréC
      Aug 16 at 20:55










    • @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
      – Zarko
      Aug 16 at 22:21










    • Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
      – AndréC
      Aug 16 at 22:35










    • @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
      – Zarko
      Aug 16 at 22:53















    hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
    – Prof de Physique-Chimie
    Aug 16 at 20:30




    hi, I must admit that yours is even shorter and better! Thank you very much for your time and work. Best regards.
    – Prof de Physique-Chimie
    Aug 16 at 20:30












    I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
    – AndréC
    Aug 16 at 20:55




    I can't compile your code. You mixed up the variables, for example, x+18 can't be calculated because x is a color written in French in the loop.
    – AndréC
    Aug 16 at 20:55












    @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
    – Zarko
    Aug 16 at 22:21




    @AndréC, ups, at correcting of code i didn't consider its last version (by which i drew shoved image). now i corrected all errors. thank you very much for pointing me on errors.
    – Zarko
    Aug 16 at 22:21












    Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
    – AndréC
    Aug 16 at 22:35




    Now this compiles well but the text below the circle is written backwards, the OP wants it readable without needing to turn the head.
    – AndréC
    Aug 16 at 22:35












    @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
    – Zarko
    Aug 16 at 22:53




    @AndréC, it seems that i still not correct all :-(, hopefully now is as should be on the first place.
    – Zarko
    Aug 16 at 22:53










    up vote
    6
    down vote













    Just for fun and inspired by the example and the answers an arrangement through a definition with parameters:



    ColorWeel(<coordinate>)[<radius>][<pseudo-sharpness>]Color_Name/Graphicx_name, Color_name/Color1!value(0-100)!color2, ...


    RESULT:
    enter image description here



    MWE:



    % By J. Leon V. Share as Beerware philosophy
    documentclass[border=20pt]standalone
    usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarydecorations.text, arrows.meta


    usetikzlibrarycalc
    begindocument
    begintikzpicture[
    % Environment Cfg
    >=Stealth[inset=0pt,length=10pt]
    ]

    %Variables: 1:Position 2:Radio 3:pseudo sharpsness 4: Name/Color array
    defColorWeel(#1)[#2][#3]#4%
    beginscope[shift=(#1)]
    %Drawing features separations.
    foreach elements [count=n] in #4
    pgfmathparseint(360/n)
    edefAnglepgfmathresult
    foreach text/color [count=i from 0] in #4
    draw[fill=color,thick](Angle*i:#2)
    arc (Angle*i:Angle*i+Angle:#2)
    -- (Angle*i+Angle:#2-0.5cm) arc (Angle*i+Angle:Angle*i:#2-0.5cm) -- cycle;
    pgfmathparseint(Angle*i)
    ifnumpgfmathresult<180
    path[decoration=text along path,raise=-4pt,text=text,text align=center,reverse path,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi
    ifnumpgfmathresult>179
    path[decoration=text along path,text=text,text align=center,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi

    clip (0,0) circle (#2-0.5cm);
    foreach text/color [count=j from 0] in #4
    foreach k in 1,2,...,20
    path[fill=color, opacity=#3](Angle*j+Angle/2: #2-0.7cm) circle (k*0.2);

    draw[thick, ->] (0,0) -- (Angle*j+Angle/2: #2-1.2cm);

    endscope


    ColorWeel(0,0)[5cm][0.05]
    Orange/orange,
    jaune/yellow,
    jaune-vert/lime,
    vert/green,
    bleu-vert/SeaGreen,
    cyan/Cyan,
    bleu roi/NavyBlue,
    bleu/blue,
    violet/violet,
    magenta/magenta,
    rouge-ros'e/RubineRed,
    rouge/red

    ColorWeel(11,0)[3.5cm][0.08]
    Blue/blue,
    Red/red,
    Yellow/yellow

    ColorWeel(7,-10)[4cm][0.08]
    black/black,
    white/white,
    green-60-black/green!60!black,
    blue-50-green/blue!50!green,
    blue-50-red/blue!50!red

    endtikzpicture
    enddocument





    share|improve this answer




















    • That's beautiful!
      – AndréC
      Aug 17 at 6:18














    up vote
    6
    down vote













    Just for fun and inspired by the example and the answers an arrangement through a definition with parameters:



    ColorWeel(<coordinate>)[<radius>][<pseudo-sharpness>]Color_Name/Graphicx_name, Color_name/Color1!value(0-100)!color2, ...


    RESULT:
    enter image description here



    MWE:



    % By J. Leon V. Share as Beerware philosophy
    documentclass[border=20pt]standalone
    usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarydecorations.text, arrows.meta


    usetikzlibrarycalc
    begindocument
    begintikzpicture[
    % Environment Cfg
    >=Stealth[inset=0pt,length=10pt]
    ]

    %Variables: 1:Position 2:Radio 3:pseudo sharpsness 4: Name/Color array
    defColorWeel(#1)[#2][#3]#4%
    beginscope[shift=(#1)]
    %Drawing features separations.
    foreach elements [count=n] in #4
    pgfmathparseint(360/n)
    edefAnglepgfmathresult
    foreach text/color [count=i from 0] in #4
    draw[fill=color,thick](Angle*i:#2)
    arc (Angle*i:Angle*i+Angle:#2)
    -- (Angle*i+Angle:#2-0.5cm) arc (Angle*i+Angle:Angle*i:#2-0.5cm) -- cycle;
    pgfmathparseint(Angle*i)
    ifnumpgfmathresult<180
    path[decoration=text along path,raise=-4pt,text=text,text align=center,reverse path,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi
    ifnumpgfmathresult>179
    path[decoration=text along path,text=text,text align=center,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi

    clip (0,0) circle (#2-0.5cm);
    foreach text/color [count=j from 0] in #4
    foreach k in 1,2,...,20
    path[fill=color, opacity=#3](Angle*j+Angle/2: #2-0.7cm) circle (k*0.2);

    draw[thick, ->] (0,0) -- (Angle*j+Angle/2: #2-1.2cm);

    endscope


    ColorWeel(0,0)[5cm][0.05]
    Orange/orange,
    jaune/yellow,
    jaune-vert/lime,
    vert/green,
    bleu-vert/SeaGreen,
    cyan/Cyan,
    bleu roi/NavyBlue,
    bleu/blue,
    violet/violet,
    magenta/magenta,
    rouge-ros'e/RubineRed,
    rouge/red

    ColorWeel(11,0)[3.5cm][0.08]
    Blue/blue,
    Red/red,
    Yellow/yellow

    ColorWeel(7,-10)[4cm][0.08]
    black/black,
    white/white,
    green-60-black/green!60!black,
    blue-50-green/blue!50!green,
    blue-50-red/blue!50!red

    endtikzpicture
    enddocument





    share|improve this answer




















    • That's beautiful!
      – AndréC
      Aug 17 at 6:18












    up vote
    6
    down vote










    up vote
    6
    down vote









    Just for fun and inspired by the example and the answers an arrangement through a definition with parameters:



    ColorWeel(<coordinate>)[<radius>][<pseudo-sharpness>]Color_Name/Graphicx_name, Color_name/Color1!value(0-100)!color2, ...


    RESULT:
    enter image description here



    MWE:



    % By J. Leon V. Share as Beerware philosophy
    documentclass[border=20pt]standalone
    usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarydecorations.text, arrows.meta


    usetikzlibrarycalc
    begindocument
    begintikzpicture[
    % Environment Cfg
    >=Stealth[inset=0pt,length=10pt]
    ]

    %Variables: 1:Position 2:Radio 3:pseudo sharpsness 4: Name/Color array
    defColorWeel(#1)[#2][#3]#4%
    beginscope[shift=(#1)]
    %Drawing features separations.
    foreach elements [count=n] in #4
    pgfmathparseint(360/n)
    edefAnglepgfmathresult
    foreach text/color [count=i from 0] in #4
    draw[fill=color,thick](Angle*i:#2)
    arc (Angle*i:Angle*i+Angle:#2)
    -- (Angle*i+Angle:#2-0.5cm) arc (Angle*i+Angle:Angle*i:#2-0.5cm) -- cycle;
    pgfmathparseint(Angle*i)
    ifnumpgfmathresult<180
    path[decoration=text along path,raise=-4pt,text=text,text align=center,reverse path,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi
    ifnumpgfmathresult>179
    path[decoration=text along path,text=text,text align=center,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi

    clip (0,0) circle (#2-0.5cm);
    foreach text/color [count=j from 0] in #4
    foreach k in 1,2,...,20
    path[fill=color, opacity=#3](Angle*j+Angle/2: #2-0.7cm) circle (k*0.2);

    draw[thick, ->] (0,0) -- (Angle*j+Angle/2: #2-1.2cm);

    endscope


    ColorWeel(0,0)[5cm][0.05]
    Orange/orange,
    jaune/yellow,
    jaune-vert/lime,
    vert/green,
    bleu-vert/SeaGreen,
    cyan/Cyan,
    bleu roi/NavyBlue,
    bleu/blue,
    violet/violet,
    magenta/magenta,
    rouge-ros'e/RubineRed,
    rouge/red

    ColorWeel(11,0)[3.5cm][0.08]
    Blue/blue,
    Red/red,
    Yellow/yellow

    ColorWeel(7,-10)[4cm][0.08]
    black/black,
    white/white,
    green-60-black/green!60!black,
    blue-50-green/blue!50!green,
    blue-50-red/blue!50!red

    endtikzpicture
    enddocument





    share|improve this answer












    Just for fun and inspired by the example and the answers an arrangement through a definition with parameters:



    ColorWeel(<coordinate>)[<radius>][<pseudo-sharpness>]Color_Name/Graphicx_name, Color_name/Color1!value(0-100)!color2, ...


    RESULT:
    enter image description here



    MWE:



    % By J. Leon V. Share as Beerware philosophy
    documentclass[border=20pt]standalone
    usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarydecorations.text, arrows.meta


    usetikzlibrarycalc
    begindocument
    begintikzpicture[
    % Environment Cfg
    >=Stealth[inset=0pt,length=10pt]
    ]

    %Variables: 1:Position 2:Radio 3:pseudo sharpsness 4: Name/Color array
    defColorWeel(#1)[#2][#3]#4%
    beginscope[shift=(#1)]
    %Drawing features separations.
    foreach elements [count=n] in #4
    pgfmathparseint(360/n)
    edefAnglepgfmathresult
    foreach text/color [count=i from 0] in #4
    draw[fill=color,thick](Angle*i:#2)
    arc (Angle*i:Angle*i+Angle:#2)
    -- (Angle*i+Angle:#2-0.5cm) arc (Angle*i+Angle:Angle*i:#2-0.5cm) -- cycle;
    pgfmathparseint(Angle*i)
    ifnumpgfmathresult<180
    path[decoration=text along path,raise=-4pt,text=text,text align=center,reverse path,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi
    ifnumpgfmathresult>179
    path[decoration=text along path,text=text,text align=center,decorate]
    (Angle*i:#2+0.5cm) arc (Angle*i:Angle*i+Angle:#2+0.5cm);
    fi

    clip (0,0) circle (#2-0.5cm);
    foreach text/color [count=j from 0] in #4
    foreach k in 1,2,...,20
    path[fill=color, opacity=#3](Angle*j+Angle/2: #2-0.7cm) circle (k*0.2);

    draw[thick, ->] (0,0) -- (Angle*j+Angle/2: #2-1.2cm);

    endscope


    ColorWeel(0,0)[5cm][0.05]
    Orange/orange,
    jaune/yellow,
    jaune-vert/lime,
    vert/green,
    bleu-vert/SeaGreen,
    cyan/Cyan,
    bleu roi/NavyBlue,
    bleu/blue,
    violet/violet,
    magenta/magenta,
    rouge-ros'e/RubineRed,
    rouge/red

    ColorWeel(11,0)[3.5cm][0.08]
    Blue/blue,
    Red/red,
    Yellow/yellow

    ColorWeel(7,-10)[4cm][0.08]
    black/black,
    white/white,
    green-60-black/green!60!black,
    blue-50-green/blue!50!green,
    blue-50-red/blue!50!red

    endtikzpicture
    enddocument






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 17 at 0:24









    J Leon V.

    6,765528




    6,765528











    • That's beautiful!
      – AndréC
      Aug 17 at 6:18
















    • That's beautiful!
      – AndréC
      Aug 17 at 6:18















    That's beautiful!
    – AndréC
    Aug 17 at 6:18




    That's beautiful!
    – AndréC
    Aug 17 at 6:18










    up vote
    4
    down vote













    With the code from your answer, I wrote the entire code. I kept the structure of your code with 3 foreach loops that fits well here.



    In each foreach loop, instead of incrementing two variables, it is also simple to count the number of colors and calculate the angles.



    To make the code easy to read and understand, I spelled out the variable names (and in French): couleur for colour, angle, n for number.



    I put the acute accent of the rouge-rosé color between braces because otherwise I have an error at compilation and this even with the tikz babel library usetikzlibrarybabel



    The inputenc package is now included in LaTeX, it is no longer necessary to load it, so I commented on it. %usepackage[utf8]inputenc



    to put the same margins with the geometry package, just write usepackage[margin=2cm]geometry



    documentclass[10pt,a4paper]article
    %usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[margin=2cm]geometry

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarycalc
    usetikzlibraryarrows,decorations.text
    usetikzlibrarybabel

    begindocument
    begintikzpicture
    %draw names
    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, jaune,jaune-vert ,vert,bleu-vert,cyan,bleu-roi

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    reverse path,
    postaction=decorate]
    (angle : 4.1) arc (angle :angle + 30 : 4.1);


    %% draw names
    foreach couleur [count=n from 7,evaluate= n as angle using n*30-15] in bleu, violet, magenta, rouge-rosé, rouge

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    postaction=decorate] (angle:4.3) arc (angle :angle+30:4.3);


    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, yellow,LimeGreen,green, SeaGreen, Cyan, NavyBlue, blue, Violet, magenta, RubineRed, red

    draw[double=couleur,
    semithick,
    double distance=5mm] (angle:3.6) arc (angle:angle+30:3.6);
    draw[->,thick] (0,0) -- (angle-15:3);

    endtikzpicture
    enddocument


    couleurs






    share|improve this answer


















    • 1




      This is a nice approach. I wasn't familiar with the count/evaluate construct.
      – Derek
      Aug 16 at 20:38






    • 2




      @Derek Learning tikz is a very long job that never ends...
      – AndréC
      Aug 16 at 20:48














    up vote
    4
    down vote













    With the code from your answer, I wrote the entire code. I kept the structure of your code with 3 foreach loops that fits well here.



    In each foreach loop, instead of incrementing two variables, it is also simple to count the number of colors and calculate the angles.



    To make the code easy to read and understand, I spelled out the variable names (and in French): couleur for colour, angle, n for number.



    I put the acute accent of the rouge-rosé color between braces because otherwise I have an error at compilation and this even with the tikz babel library usetikzlibrarybabel



    The inputenc package is now included in LaTeX, it is no longer necessary to load it, so I commented on it. %usepackage[utf8]inputenc



    to put the same margins with the geometry package, just write usepackage[margin=2cm]geometry



    documentclass[10pt,a4paper]article
    %usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[margin=2cm]geometry

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarycalc
    usetikzlibraryarrows,decorations.text
    usetikzlibrarybabel

    begindocument
    begintikzpicture
    %draw names
    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, jaune,jaune-vert ,vert,bleu-vert,cyan,bleu-roi

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    reverse path,
    postaction=decorate]
    (angle : 4.1) arc (angle :angle + 30 : 4.1);


    %% draw names
    foreach couleur [count=n from 7,evaluate= n as angle using n*30-15] in bleu, violet, magenta, rouge-rosé, rouge

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    postaction=decorate] (angle:4.3) arc (angle :angle+30:4.3);


    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, yellow,LimeGreen,green, SeaGreen, Cyan, NavyBlue, blue, Violet, magenta, RubineRed, red

    draw[double=couleur,
    semithick,
    double distance=5mm] (angle:3.6) arc (angle:angle+30:3.6);
    draw[->,thick] (0,0) -- (angle-15:3);

    endtikzpicture
    enddocument


    couleurs






    share|improve this answer


















    • 1




      This is a nice approach. I wasn't familiar with the count/evaluate construct.
      – Derek
      Aug 16 at 20:38






    • 2




      @Derek Learning tikz is a very long job that never ends...
      – AndréC
      Aug 16 at 20:48












    up vote
    4
    down vote










    up vote
    4
    down vote









    With the code from your answer, I wrote the entire code. I kept the structure of your code with 3 foreach loops that fits well here.



    In each foreach loop, instead of incrementing two variables, it is also simple to count the number of colors and calculate the angles.



    To make the code easy to read and understand, I spelled out the variable names (and in French): couleur for colour, angle, n for number.



    I put the acute accent of the rouge-rosé color between braces because otherwise I have an error at compilation and this even with the tikz babel library usetikzlibrarybabel



    The inputenc package is now included in LaTeX, it is no longer necessary to load it, so I commented on it. %usepackage[utf8]inputenc



    to put the same margins with the geometry package, just write usepackage[margin=2cm]geometry



    documentclass[10pt,a4paper]article
    %usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[margin=2cm]geometry

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarycalc
    usetikzlibraryarrows,decorations.text
    usetikzlibrarybabel

    begindocument
    begintikzpicture
    %draw names
    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, jaune,jaune-vert ,vert,bleu-vert,cyan,bleu-roi

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    reverse path,
    postaction=decorate]
    (angle : 4.1) arc (angle :angle + 30 : 4.1);


    %% draw names
    foreach couleur [count=n from 7,evaluate= n as angle using n*30-15] in bleu, violet, magenta, rouge-rosé, rouge

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    postaction=decorate] (angle:4.3) arc (angle :angle+30:4.3);


    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, yellow,LimeGreen,green, SeaGreen, Cyan, NavyBlue, blue, Violet, magenta, RubineRed, red

    draw[double=couleur,
    semithick,
    double distance=5mm] (angle:3.6) arc (angle:angle+30:3.6);
    draw[->,thick] (0,0) -- (angle-15:3);

    endtikzpicture
    enddocument


    couleurs






    share|improve this answer














    With the code from your answer, I wrote the entire code. I kept the structure of your code with 3 foreach loops that fits well here.



    In each foreach loop, instead of incrementing two variables, it is also simple to count the number of colors and calculate the angles.



    To make the code easy to read and understand, I spelled out the variable names (and in French): couleur for colour, angle, n for number.



    I put the acute accent of the rouge-rosé color between braces because otherwise I have an error at compilation and this even with the tikz babel library usetikzlibrarybabel



    The inputenc package is now included in LaTeX, it is no longer necessary to load it, so I commented on it. %usepackage[utf8]inputenc



    to put the same margins with the geometry package, just write usepackage[margin=2cm]geometry



    documentclass[10pt,a4paper]article
    %usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc
    usepackageamsmath
    usepackageamsfonts
    usepackageamssymb
    usepackagemakeidx
    usepackagegraphicx
    usepackagelmodern
    usepackagekpfonts
    usepackage[margin=2cm]geometry

    usepackage[dvipsnames]xcolor
    usepackagetikz
    usetikzlibrarycalc
    usetikzlibraryarrows,decorations.text
    usetikzlibrarybabel

    begindocument
    begintikzpicture
    %draw names
    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, jaune,jaune-vert ,vert,bleu-vert,cyan,bleu-roi

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    reverse path,
    postaction=decorate]
    (angle : 4.1) arc (angle :angle + 30 : 4.1);


    %% draw names
    foreach couleur [count=n from 7,evaluate= n as angle using n*30-15] in bleu, violet, magenta, rouge-rosé, rouge

    path[decoration=
    text along path,
    text=couleur,
    text align=center,
    postaction=decorate] (angle:4.3) arc (angle :angle+30:4.3);


    foreach couleur [count=n from 0, evaluate= n as angle using n*30-15] in orange, yellow,LimeGreen,green, SeaGreen, Cyan, NavyBlue, blue, Violet, magenta, RubineRed, red

    draw[double=couleur,
    semithick,
    double distance=5mm] (angle:3.6) arc (angle:angle+30:3.6);
    draw[->,thick] (0,0) -- (angle-15:3);

    endtikzpicture
    enddocument


    couleurs







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 17 at 11:19

























    answered Aug 16 at 16:52









    AndréC

    3,174729




    3,174729







    • 1




      This is a nice approach. I wasn't familiar with the count/evaluate construct.
      – Derek
      Aug 16 at 20:38






    • 2




      @Derek Learning tikz is a very long job that never ends...
      – AndréC
      Aug 16 at 20:48












    • 1




      This is a nice approach. I wasn't familiar with the count/evaluate construct.
      – Derek
      Aug 16 at 20:38






    • 2




      @Derek Learning tikz is a very long job that never ends...
      – AndréC
      Aug 16 at 20:48







    1




    1




    This is a nice approach. I wasn't familiar with the count/evaluate construct.
    – Derek
    Aug 16 at 20:38




    This is a nice approach. I wasn't familiar with the count/evaluate construct.
    – Derek
    Aug 16 at 20:38




    2




    2




    @Derek Learning tikz is a very long job that never ends...
    – AndréC
    Aug 16 at 20:48




    @Derek Learning tikz is a very long job that never ends...
    – AndréC
    Aug 16 at 20:48










    up vote
    3
    down vote













    I would probably start with something like this:



    documentclass[10pt,a4paper]article
    usepackage[utf8]inputenc
    usepackage[french]babel
    usepackage[T1]fontenc

    usepackagetikz
    usetikzlibrarycalc
    usetikzlibraryarrows,decorations.text

    begindocument

    begintikzpicture

    foreach x/text in
    0/orange, 1/jaune, 2/jaune-vert, 3/vert, 4/bleu-vert, 5/cyan, 6/bleu

    path[postaction=decoration=text along path, text=text,
    text align=center, reverse path, decorate]
    (30*x - 15:6.6) arc (30*x - 15:30*x + 15:6.6);


    endtikzpicture
    enddocument





    share|improve this answer
























      up vote
      3
      down vote













      I would probably start with something like this:



      documentclass[10pt,a4paper]article
      usepackage[utf8]inputenc
      usepackage[french]babel
      usepackage[T1]fontenc

      usepackagetikz
      usetikzlibrarycalc
      usetikzlibraryarrows,decorations.text

      begindocument

      begintikzpicture

      foreach x/text in
      0/orange, 1/jaune, 2/jaune-vert, 3/vert, 4/bleu-vert, 5/cyan, 6/bleu

      path[postaction=decoration=text along path, text=text,
      text align=center, reverse path, decorate]
      (30*x - 15:6.6) arc (30*x - 15:30*x + 15:6.6);


      endtikzpicture
      enddocument





      share|improve this answer






















        up vote
        3
        down vote










        up vote
        3
        down vote









        I would probably start with something like this:



        documentclass[10pt,a4paper]article
        usepackage[utf8]inputenc
        usepackage[french]babel
        usepackage[T1]fontenc

        usepackagetikz
        usetikzlibrarycalc
        usetikzlibraryarrows,decorations.text

        begindocument

        begintikzpicture

        foreach x/text in
        0/orange, 1/jaune, 2/jaune-vert, 3/vert, 4/bleu-vert, 5/cyan, 6/bleu

        path[postaction=decoration=text along path, text=text,
        text align=center, reverse path, decorate]
        (30*x - 15:6.6) arc (30*x - 15:30*x + 15:6.6);


        endtikzpicture
        enddocument





        share|improve this answer












        I would probably start with something like this:



        documentclass[10pt,a4paper]article
        usepackage[utf8]inputenc
        usepackage[french]babel
        usepackage[T1]fontenc

        usepackagetikz
        usetikzlibrarycalc
        usetikzlibraryarrows,decorations.text

        begindocument

        begintikzpicture

        foreach x/text in
        0/orange, 1/jaune, 2/jaune-vert, 3/vert, 4/bleu-vert, 5/cyan, 6/bleu

        path[postaction=decoration=text along path, text=text,
        text align=center, reverse path, decorate]
        (30*x - 15:6.6) arc (30*x - 15:30*x + 15:6.6);


        endtikzpicture
        enddocument






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 16 at 16:50









        Derek

        1,212513




        1,212513




















            up vote
            3
            down vote













            I red carefully all your answers, and i think i got it!



            documentclass[10pt,a4paper]article
            usepackage[utf8]inputenc
            usepackage[french]babel
            usepackage[T1]fontenc
            usepackageamsmath
            usepackageamsfonts
            usepackageamssymb
            usepackagemakeidx
            usepackagegraphicx
            usepackagelmodern
            usepackagekpfonts
            usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]geometry

            usepackage[dvipsnames]xcolor
            usepackagetikz
            usetikzlibrarycalc
            usetikzlibraryarrows,decorations.text

            begindocument
            begintikzpicture
            %draw names
            foreach x/text in 0/orange, 30/jaune, 60/jaune-vert , 90/vert, 120/bleu-vert, 150/cyan, 180/bleu-rois

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            reverse path
            ,
            decorate] (-15+x:4.3) arc (-15+x :15+x:4.3);

            % draw names
            foreach x/text in 210/bleu, 240/violet, 270/magenta, 300/rouge-rosé, 330/rouge

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            ,decorate] (-15+x:4.5) arc (-15+x :15+x:4.5);

            %draw circles and color
            foreach x/text in 0/orange, 30/yellow, 60/LimeGreen, 90/green, 120/SeaGreen, 150/Cyan, 180/NavyBlue, 210/blue, 240/Violet, 270/magenta, 300/RubineRed, 330/red

            draw [fill=text](15+x:4)-- (15+x:3.5) arc(15+x:-15+x:3.5)--(-15+x:4)arc (-15+x:15+x:4)--cycle;

            foreach x in 0, 30, ..., 150
            draw[<->, thick, black, rotate=x] (0,3)--(0,-3);
            endtikzpicture


            enddocument


            enter image description here






            share|improve this answer
















            • 1




              which answer you read? with yours here are now four :-)
              – Zarko
              Aug 16 at 18:05














            up vote
            3
            down vote













            I red carefully all your answers, and i think i got it!



            documentclass[10pt,a4paper]article
            usepackage[utf8]inputenc
            usepackage[french]babel
            usepackage[T1]fontenc
            usepackageamsmath
            usepackageamsfonts
            usepackageamssymb
            usepackagemakeidx
            usepackagegraphicx
            usepackagelmodern
            usepackagekpfonts
            usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]geometry

            usepackage[dvipsnames]xcolor
            usepackagetikz
            usetikzlibrarycalc
            usetikzlibraryarrows,decorations.text

            begindocument
            begintikzpicture
            %draw names
            foreach x/text in 0/orange, 30/jaune, 60/jaune-vert , 90/vert, 120/bleu-vert, 150/cyan, 180/bleu-rois

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            reverse path
            ,
            decorate] (-15+x:4.3) arc (-15+x :15+x:4.3);

            % draw names
            foreach x/text in 210/bleu, 240/violet, 270/magenta, 300/rouge-rosé, 330/rouge

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            ,decorate] (-15+x:4.5) arc (-15+x :15+x:4.5);

            %draw circles and color
            foreach x/text in 0/orange, 30/yellow, 60/LimeGreen, 90/green, 120/SeaGreen, 150/Cyan, 180/NavyBlue, 210/blue, 240/Violet, 270/magenta, 300/RubineRed, 330/red

            draw [fill=text](15+x:4)-- (15+x:3.5) arc(15+x:-15+x:3.5)--(-15+x:4)arc (-15+x:15+x:4)--cycle;

            foreach x in 0, 30, ..., 150
            draw[<->, thick, black, rotate=x] (0,3)--(0,-3);
            endtikzpicture


            enddocument


            enter image description here






            share|improve this answer
















            • 1




              which answer you read? with yours here are now four :-)
              – Zarko
              Aug 16 at 18:05












            up vote
            3
            down vote










            up vote
            3
            down vote









            I red carefully all your answers, and i think i got it!



            documentclass[10pt,a4paper]article
            usepackage[utf8]inputenc
            usepackage[french]babel
            usepackage[T1]fontenc
            usepackageamsmath
            usepackageamsfonts
            usepackageamssymb
            usepackagemakeidx
            usepackagegraphicx
            usepackagelmodern
            usepackagekpfonts
            usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]geometry

            usepackage[dvipsnames]xcolor
            usepackagetikz
            usetikzlibrarycalc
            usetikzlibraryarrows,decorations.text

            begindocument
            begintikzpicture
            %draw names
            foreach x/text in 0/orange, 30/jaune, 60/jaune-vert , 90/vert, 120/bleu-vert, 150/cyan, 180/bleu-rois

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            reverse path
            ,
            decorate] (-15+x:4.3) arc (-15+x :15+x:4.3);

            % draw names
            foreach x/text in 210/bleu, 240/violet, 270/magenta, 300/rouge-rosé, 330/rouge

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            ,decorate] (-15+x:4.5) arc (-15+x :15+x:4.5);

            %draw circles and color
            foreach x/text in 0/orange, 30/yellow, 60/LimeGreen, 90/green, 120/SeaGreen, 150/Cyan, 180/NavyBlue, 210/blue, 240/Violet, 270/magenta, 300/RubineRed, 330/red

            draw [fill=text](15+x:4)-- (15+x:3.5) arc(15+x:-15+x:3.5)--(-15+x:4)arc (-15+x:15+x:4)--cycle;

            foreach x in 0, 30, ..., 150
            draw[<->, thick, black, rotate=x] (0,3)--(0,-3);
            endtikzpicture


            enddocument


            enter image description here






            share|improve this answer












            I red carefully all your answers, and i think i got it!



            documentclass[10pt,a4paper]article
            usepackage[utf8]inputenc
            usepackage[french]babel
            usepackage[T1]fontenc
            usepackageamsmath
            usepackageamsfonts
            usepackageamssymb
            usepackagemakeidx
            usepackagegraphicx
            usepackagelmodern
            usepackagekpfonts
            usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]geometry

            usepackage[dvipsnames]xcolor
            usepackagetikz
            usetikzlibrarycalc
            usetikzlibraryarrows,decorations.text

            begindocument
            begintikzpicture
            %draw names
            foreach x/text in 0/orange, 30/jaune, 60/jaune-vert , 90/vert, 120/bleu-vert, 150/cyan, 180/bleu-rois

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            reverse path
            ,
            decorate] (-15+x:4.3) arc (-15+x :15+x:4.3);

            % draw names
            foreach x/text in 210/bleu, 240/violet, 270/magenta, 300/rouge-rosé, 330/rouge

            path[postaction=decoration=
            text along path,
            text= text,
            text align=center,
            ,decorate] (-15+x:4.5) arc (-15+x :15+x:4.5);

            %draw circles and color
            foreach x/text in 0/orange, 30/yellow, 60/LimeGreen, 90/green, 120/SeaGreen, 150/Cyan, 180/NavyBlue, 210/blue, 240/Violet, 270/magenta, 300/RubineRed, 330/red

            draw [fill=text](15+x:4)-- (15+x:3.5) arc(15+x:-15+x:3.5)--(-15+x:4)arc (-15+x:15+x:4)--cycle;

            foreach x in 0, 30, ..., 150
            draw[<->, thick, black, rotate=x] (0,3)--(0,-3);
            endtikzpicture


            enddocument


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 16 at 17:50









            Prof de Physique-Chimie

            1056




            1056







            • 1




              which answer you read? with yours here are now four :-)
              – Zarko
              Aug 16 at 18:05












            • 1




              which answer you read? with yours here are now four :-)
              – Zarko
              Aug 16 at 18:05







            1




            1




            which answer you read? with yours here are now four :-)
            – Zarko
            Aug 16 at 18:05




            which answer you read? with yours here are now four :-)
            – Zarko
            Aug 16 at 18:05

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446301%2ftikz-dimension-too-large-drawing-a-color-wheel%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay