The stripes aren't stripes until you squeeze the tube. The colored bits are stored in reservoirs close to the tip and little holes in the nozzle let it out in a stripey shape together with the main base paste.
The graphite (or colored compund in case of colored pencils) is glued into grooves between boards and then the pencil shape is cut into the boards until the pencils fall apart. (Then a paint/paper/plastic coating and/or an eraser can be added.)