Study the resistor color code chart. Note how the colors can make you think of a rainbow. Notice that the resistor color values are numbered from 0 to 9. Zero and 9 are polar opposites on this scale. The colors black and white are also polar opposites.Visualize a rainbow with a polar world where darkness is the lowest value (0) at one pole and light is the highest value (9) at another pole. You now have an association where the values for black and white are the numbers for 0 and 9 respectively for an image of a polar world that has a rainbow.
Consider the next pair of color/numbers that are closest to being polar on your scale of 0 to 9: 1 and 8. One (brown) can be considered a shade lighter than black, and 8 (gray) can be considered a shade darker than white. Your visual image of a polar world has one pole with black tapering to brown at one end and white tapering to gray at the other end. Now you have four colors and their values committed to memory of a world with dark and light poles that has a rainbow.
Go further with the word association and visualization. You have an image of a world. Who made the world? God. Before there was life on Earth, God gave us light in the form of the sun. Say that God named the sun ROY. Now you have the colors and values for red, orange and yellow in their proper order if you visualize the creation of the imagined world beginning with darkness and letting there be light with a sun named ROY with the colors of red, orange and yellow.
The three remaining colors are green, blue and violet, with the values 5, 6 and 7, respectively. Carrying the creation theme a little further, you can visualize that after the sun gave us light, there was life: Biblically, the ground rose above the waters and gave us a green earth, blue lakes and the growth of plant life, e.g. violets. Now you have the colors green, blue and violet visualized in order with their values.
The complete picture to this memory aid is associating the colors of the resistors with a rainbow over a polar world of darkness and light that was created by God, who named the sun ROY, which was followed by the earth rising above the waters and giving us green grass, blue lakes and violets.