Algorithms of Multi-Coloured Knitting

I’ve already posted about hacking a knitting machine to accept multi-colour patterns. Today I’d like to expand on that with some work I’ve done recently to improve the multi-colour algorithm.

When I knit in multi-colour I use a method called Double Jacquard. This involves the Brother KM-950i, ribber KR-850 and colour changer KC-900.

Different coloured yarns are held in the colour changer on the left. Moving the carriage right with one coloured yarn will simultaneously knit the yarn into the front (knitting machine bed up top) and back (ribber bed down the bottom) to create double-layered knitting.

The result is a multi-coloured pattern on the front and a simple pattern called Birds Eye to tie all the loose yarn together on the back.

Knitted pattern on the front, knitted birds eye on the back and purls in the middle. I also sell these personalized baby blankets on Etsy.

But we can do better than this.

There are several complexities to be aware of with this setup. For each row of knitting in the fabric the carriage has to pass over the knitting twice for each colour. Once to go to the right edge of the knitting machine and again to get back to the left to change colours.

That means for a three coloured pattern, there’s six passes of the carriage to knit one row in the fabric. It’s a lot of work!

In the interest of keeping the process as simple and stress-free as possible, I try to use the same sequence of colours all the time (1,2,3,1,2,3,1,2,3) and never change the ribber settings as I knit (although there are some fantastic variations you can try if you’re so inclined).

My first multi-colour hack created patterns that incorporated these ideas, but it only works by doubling the height of the pattern (using pattern variation switch 4 on the knitting machine) to enable the carriage to return to the colour changer.

Double height using pattern variation switch 4

Obviously, this isn’t ideal as it means there are two knits for every pixel in the original image. Four knits if you want square pixels using the double width as well (pattern variation switch 3). The results get very pixelated!

Double width using pattern variation switch 3

Alessandrina also posted about this issue a few years ago to help punch card knitters plan their multi-colour work by hand. Unfortunately, she didn’t provide any workable solutions aside from my double height method.

Thing is, I KNOW for a fact multi-coloured double jacquard can be done using one knit per pixel. I know because other very talented machine knitters such as Woolly Wallaby have shown me it can be done. The fancy Passap E6000 can do it (clearly using some kind of dark magic). Sadly I don’t have access to such clever machines to understand how they do it.

Phew, that’s an awful lot of typing and I’ve only just introduced to you the basic premise of what I’ve been up to.

So what HAVE I been up to? Theoretical knitting of course! I’ve been theorizing how machines like the Passap E6000 might generate multi-colour patterns with one knit per pixel. And with a single colour changer on one side no less. Excitingly, I’ve come up with a benchmark of a few possible algorithms! It nearly did my head. Here are the results.

1. Double width, double height method

This is the original method I described above, knitted here to benchmark against the theoretical methods. It’s just a standard pattern which works with the double height pattern variation switch so the carriage can return to the colour changer after each pass. Double width to get square pixels.

1.5 rows of birds eye knitting in the back for every row in the front so overall elongation of the work is kept to a minimum. 456 total rows of knitting this test pattern.

2. Offset every first and last colour method

This method offsets each line just like the KRC pattern variation switch. This means it knits the last colour in the previous row and returns by knitting the first colour of the next row. The only way I could work out how to knit a third colour into this method is to return with a blank row, although dithered would probably work as well.

2 rows of birds eye knitting in the back for every row in the front causing some elongation. 283 total rows of knitting this test pattern.

3. Blank second pass method

This method is the simplest. Every row in the pattern is followed by a blank row to allow the carriage to return to the colour changer.

3 rows of birds eye knitting in the back for every row in the front causes worse elongation. 456 total rows of knitting this test pattern.

4. Dithered method

The first colour, first row in the pattern knits every first needle. The first colour, second row in the pattern knits every second needle.

3 rows of birds eye knitting in the back for every row in the front. Oddly the elongation is worse than the blank second pass method. 456 total rows of knitting this test pattern.


The double width, double height method has its charms but the clear winner here is the offset method. It has a negligible amount of elongation, the least number of passes overall and is able to achieve the one knit per pixel goal.

Look ma, one knit per pixel. I just quadrupled my knitting resolution!

I’ve released an update to the multi-colour hack so you can choose which algorithm you want to use. If you don’t define an algorithm it’ll use offset by default. Enjoy!

Close up of the offset method. Click to zoom!

If you have a fancy knitting machine like the Passap E6000 or know how they calculate multi-colour patterns PLEASE GET IN TOUCH! I’d love to know if any of this work even comes close to how they do it.

17 Replies to “Algorithms of Multi-Coloured Knitting”

  1. Love your post, patterning it is an incredible amount of of work and appreciate that you are sharing and showing your results.

    I am a Passap E6000 knitter so most of the terminology you use with “switch”, dither, double width are terms I am not familiar with. So I guess the Passap is magic! The elongation happens with Passap as well, for the birds- eye patterning on the reverse.

    1. Thanks for your reply! It’s helpful to know the Passap E6000 also has elongation with birds-eye as that tells me I’m on the right track. Don’t worry too much about the terminology I use though, I’ve made it up because I can’t find any information about this stuff anywhere else 🙂

  2. I love the work you’re doing on this. I am, however, somewhat skeptical. I have done intensive work on the same subject myself. If you choose one of Wooly Wallaby’s pieces that has 3 colors, and zoom right in, you’ll see that, in fact, all of the stitches are double. There are no single height stitches. It might be worth writing to ask the creator. Likewise, if you look at all of the 3 color patterns that are in the E6000 repertoire (the preloaded patterns) they are all double height, as well.

    I, too, thought that I had conquered this dilemma years ago with a slightly different algorithm. My initial swatches were very promising. But I was fooled. The design I used for initial testing was coincidentally suited to single stitch high knitting, and I didn’t percieve the areas where it wasn’t working, though on closer inspection later I could see that they were there. However, when I started to knit larger, much more complex pieces they turned into total confusion. What I realized was happening was that some stitches were getting stretched over 6 rows, while others were not knitting where I wanted them too.

    I did, finally, succeed in knitting a single pixel resolution piece, using a sequence of color 1,2,3,1,2,3 and picking up and dropping each color after a single pass. A LOT of hassle, because to change colors on the right side means disconnecting the ribber carriage from the connector arm and winkling the yarn between the carriages. Also, this only works with and odd number of colors. if you are knitting with an even number of colors, you have to knit 1,2,3,4,4,3,2,1.
    I will be very interested to see what results you get if you go to a very complex, multi-color piece.

    1. Hi Tanya,

      Thanks so much for your comment! I really value your expertise on this subject since I’m just exploring it for the first time myself.

      I’ve added a close-up photo to the bottom of my blog post so you can better see the results of the offset method on the two test patterns I’ve done. I think it’s safe to say this is a success on three colour patterns ♥

      I haven’t tested more than three colours so far, but I’d theorize it’ll work for four colours as well. You’re right in saying the more colours the greater the elongation problem given the restraints I’ve described above.

      I know commercial knitting machines change colours on both the left and right side. Makes me sad that neither the Passap nor the Brother are designed for colour changing on both sides. The new kickstarter Kniterate does though which is very exciting!

  3. Hi Sarah I came across your YouTube video “Sarah Spencer: The Knitting Network Printer” which lead me to your blog here 🙂 I was interested in understanding what you meant by “Offset every first and last color” as a jacquard color separation method and after more closely looking at the “offset method” chart you have posted here I think Ive come to the realization what you are referring to an already existing/established method 🙂

    In Designaknit this is referred to as Jacquard Separation Method B 🙂 Refer to the designaknit stitch designer manual I uploaded here for you go to page 78 and look at the “Jacquard Separation Methods” section. I could be wrong but it looks to me like what your describing is Jacquard Separation Method B ???

    1. Hi George,

      I personally don’t own nor have I looked at the Designaknit software. This is because I’m writing my own software and making it open source, so I try to avoid being influenced by commercial software as I don’t want to rip them off. Any similarity in our work is a coincidence and achieved by completely independent processes.

      Having said that, I’ve had a brief glance at Jacquard Separation Method B that you’re referring to. I think my Offset algorithm is different. In simple terms, my Offset algorithm performs standard two colour double jacquard (same as on the knitting machine) except it introduces the third colour by knitting a single row left-to-right, then not knitting on the main bed at all right-to-left. It’s further optimised by performing this operation alternately, so the colour it does it on is cycled. This produces one row of knitting on the front for each row in the pattern.

      Jacquard Separation Method B, however, appears to knit the row left-to-right, then knit the same row (duplicate) right-to-left. If that’s correct, it would produce double height knitting, where each row of the pattern is represented by two rows in the knit on the front.

      I haven’t seen anyone else achieve a single row in three colours using double jacquard in any of the groups or forums I watch. Even more reason why I don’t think it’s available in any other software. If you can do that with Designaknit I’d love to see the end result! 🙂

  4. Designaknit would not be the only software or documentation referring to different methods of jacquard separation. Other industry software/documentation (from stoll etc) would as well. And I’m sure I remember coming across articles in some of my old 90s machine knitting magazines covering the topic. I just referred you to the designaknit reference cause I had the manual/reference handy 🙂 I wouldn’t be too concerned about ripping off anyone 🙂 Flat bed knitting technology and in turn jacquard separation methods/techniques have been around a long time, there is nothing proprietary regarding this knowledge. If your only referring to domestic machine knitters forums or even domestic machine knitters association/groups don’t be too surprised if the technical knowledge in not necessarily very deep, although i can vouch for the mkav mooney ponds club.

    I’m not sure you have understood the documentation correctly. “Method B” does not involve duplicate rows. The sequence and separation method looks the same to me as your “offset method” both use 6 passes to lay down 2 rows on the front bed of the 3 color design.
    COLOR 1 PASS 1
    COLOR 2 PASS 2
    COLOR 2 PASS 3
    COLOR 3 PASS 4
    COLOR 3 PASS 5
    COLOR 1 PASS 6
    Is this correct?
    This method only differs from the standard “Method A” in the color sequence used for working out the separation
    COLOR 1 PASS 1
    COLOR 1 PASS 2
    COLOR 2 PASS 3
    COLOR 2 PASS 4
    COLOR 3 PASS 5
    COLOR 3 PASS 6
    With both methods you will still need to adjust/correct the design to allow for the fact that you are still laying down two rows of the design with each color pass. What I have noticed is that often method B can reproduce a “truer” pixel to pixel iteration of your design with less corrections/adjustments needed than the traditional method A.

    But with either method as long as your laying down two rows of the design with each color pass ie only changing yarn color on one side of the bed and knitting in with each pass. You will not get a true pixel to pixel conversion of your design unless your very lucky. You will definitely get better resolution in your image conversion that doing duplicate rows! The physical knitting process means you can’t lay a color under one that’s already been laid so that may well effect the placement of some stitches (pixels) of your design.

    A true pixel to pixel iteration of a design can only really be guaranteed with method C
    COLOR 1 PASS 1
    COLOR 2 PASS 2
    COLOR 3 PASS 3
    Unless I’ve misunderstood?

  5. Sorry I had another look over the designaknit separation method definitions and my characterization of method C was incorrect.

    The below method or pattern I suggested is not method C
    COLOR 1 PASS 1
    COLOR 2 PASS 2
    COLOR 3 PASS 3
    and would essentially require manual color changing at both ends of the bed with several options of choice for back bed action.

    A true pixel to pixel iteration of a design without manual color changing can only really be guaranteed with a variant of method F. Which the designaknit manual refers to as the half milano method where the first pass knits the appropriate needles on the main bed and working needles on the ribber, but the return pass will only knit working needles on the ribber.

    For a 3-color pattern, the sequence is as follows:
    Pass 1 = Colour 1, Row 1, Main Bed + Ribber
    Pass 2 = Colour 1, return, Ribber only
    Pass 3 = Colour 2, Row 1, Main Bed + Ribber
    Pass 4 = Colour 2, return, Ribber only
    Pass 5 = Colour 3, Row 1, Main Bed + Ribber
    Pass 6 = Colour 3, return, Ribber only

    With any jacquard variations the more colors in the design the more unbalanced the construction can get with more rows knitted in the back vs front or vice versa. This is where you need to conciser options like when to keep the ribber in or out of action or with Japanese machines using a birds eye ribber carriage or with passaps running an alternating needle pattern on the back bed to balance the fabrication.

Leave a Reply

Your email address will not be published. Required fields are marked *