0 Replies Latest reply on Mar 7, 2012 12:48 PM by bduffy323

    fill color problems

    bduffy323 Level 1

      var elemBox = currentPage.textFrames.add();

      var addedColor = myDoc.colors.add({space:ColorSpace.RGB,colorValue:[r,g,b]});

      elemBox.fillColor = addedColor;

       

      I am putting multiple textFrames down that each have different fill colors. When working with .indd files this code works fine for all custom colors. I tried using this for a .indt file and I get "Error: Invalid value for set property 'fillColor'. Expected Swatch or String, but received Color." Also to make things stranger, a gray color with RGB = "128 128 128" works fine and I receive the error on RGB = "0 102 255". Any Ideas?

       

       

      EDIT: The first color  "128 128 128"gets added with the name "Black copy" which I clearly did not name it that, and it errors on the second color I try to add.