I aim to create an interleaving style of stacked graph of black/white/black pattern in illustrator.Like a DNA profile or a variable length bar code.

Currently the values defaults to shades of grey. When i try to replace colour it doesnt work as effectively as i need it to change.

Current Artifact generated automatically.

| improve this question | | | | |
  • What method are you using in trying to "replace color"? – BANG Jun 3 '17 at 9:48
  • Try using a gradient. You can have many colors inside a gradient. And you can disable the flow so the colors fo not mix. But i personally think that the method which @Billy Kerr described here is more useful in this situation – BlueWizard Jun 3 '17 at 21:57
  • So you want to generate large images which contain barcode-like stripes of alterating width and color which you need to adjust often and easily? My first guess would be to write a program which generates SVG images in the style you want. Alternatively if this is really important to you and you don't have the skills yourself then maybe hire a freelancer or something to do this for you. – BlueWizard Jun 3 '17 at 22:02

Use the Direct Selection tool (A) to select one of the parts of the graph, and then apply a fill to it.

Screenshot of Graph being filled with colour

| improve this answer | | | | |
  • i have at the moment 85 elements, to do this manually would be extremely difficult. I may have even more in the future – agfkhj11 Jun 2 '17 at 12:13
  • So, once you have coloured it once, you can use the graph again by copying and pasting it, and just change the data. The colours you chose will stick. – Billy Kerr Jun 2 '17 at 15:08
  • unfortunately it doesn't scale for me.. link here is at an attempt at the method – agfkhj11 Jun 3 '17 at 17:49
  • it works till exactly the number of patterns i set if i set 30 patterns the new copy will repeat / use the pattern till 30, anything beyond 30 it tends to go on its own agenda of colouring – agfkhj11 Jun 3 '17 at 17:54

Try Gradient map.

  1. On the layers panel, use the circle icon, add a new layer, a Gradient Map.

2-3. And then choose or prepare your color scheme.

What it is going to happen is that the gray levels will be changed to a color defined in the new gradient.

enter image description here

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.