Swatch from square-pattern backrgound

Hi
Am hoping someone can help me. I have an image (JPG) that I want to create a pattern fill / swatch from. Here is the pattern:
Now, I started creating little squares using the rectangle tool and tried to line them up next to each other and fill them in. That takes a long time. I also tried to use 'rectangle grid tool' but couldn't select the squares. There has got to be an easier way ...
Please help
John

You can also make a pattern swatch using your existing image.
Place the image and embed it.
Select and press Cmd/Ctrl+7. Send the resulting rectangle to the back.
Drag both to the Swatches panel.

Similar Messages

  • Accessing Swatches from library

    Hi,
    I am creating a rectangle with VBscript and AI cs3
    Set rectPath = pathItemsRef.Rectangle(300,10 , 100, 100)
    and filling its color with swatch name as
    rectPath.FillColor = garmentDoc.Swatches("Offset Squares Pattern").Color
    and is working fine.
    Now my issue how to access a swatch from library items I have created my own swatches and save it in library name say "Animal" in this library there is a swatch name say "Cheetah" can anyone help me out in accessing this swatch from library with VBscript.
    Thanks
    Girish

    Upon investigating this further at my end, we found the issue was that I had created the rectangles in the source Muse file with custom colors - but DID NOT have those colors in the swatches panel. That caused the swatches to be not exported with the MULIB.
    Once I created swatches for my custom colors in the source Muse file and then exported rectangles with those color fills via Library, I was able to see the swatches added to my target Muse installation upon importing the MULIB.
    Let me know if your issue is similar. Also share the exact steps that you are following if your case is different.
    Cheers,
    Vikas

  • Create Pattern Swatch from Placed Image in Javascript

    I need to create a large number of pattern swatches from some .jpg file on disk. I've figured out how to script the insertion of the .jpgs into my AI document as placed images:
         // Embed the image into the document.
         file = new File("MyImage.jpg");
         var document = app.activeDocument;
         var newPlaced = document.layers["swatches"].groupItems.createFromFile(file);
         newPlaced.name = "MyImage_Placed";
    This works fine and the item shows up in the correct layer as an embedded image.
    Now I want to create a PatternSwatch (I think) from that Image.
    To create a new swatch the code starts out as:
         newSwatch = document.swatches.add();
         newSwatch.name = "MyImage_Swatch";
    but now I'm stuck! How do I associate the new PlacedItem with the swatch I just created? I can see the swatch in the palette so I'm partway there.

    When you say you would drag the image itself into the Swatch Palette and it would show the image itself? How would then use this swatch? Can you give an example of what you would apply a jpeg to as a swatch? The only palette that I can think of off the top of my head that you can drag a jpeg into and have the icon appear as the jpeg is the Symbols Palette. Is is possible that you were using the Symbols Palette in the past and not the Swatch Palette?

  • Script to apply a random CMYK swatches from a group of swatches to selected objects.

    I would like to write some scripts for randomising the allocation of swatches to adjacent object.
    Example:
    Imagine a map of Europe and all her nation states/territories. I have a User Defined Swatch Library. I can open the AI document it was made from as I understand from this thread that having the swatches as objects on the page makes them easier to be referenced in a script. 
    I want to iterate through the selected objects and randomly assign one of the colours in the swatch document as a fill to each object. It would be great if hidden swatches (they are all small rectangular 'colour chip' filled paths) on page were not included in the reference swatches randomly choosen from.
    Iterating the selected objects I can do, but not sure what references I need to use to create an array of swatches to randomly choose from.
    I see I can make an array of swatches using the general swatch group from Adobe's CreateSwatchGroup scripts:
    JS
    var docRef = app.documents.add(DocumentColorSpace.CMYK)
    // Create a new SwatchGroup
    var swatchGroup = docRef.swatchGroups.add();
    swatchGroup.name = "CreateSwatchGroup";
    // Get list of swatches in general swatch group
    var genSwatchGroup = docRef.swatchGroups[0];
    // Collect 5 random swatches from general swatch group and move to new group
    var i = 0;
    while (i < 5) {
              var swatches = genSwatchGroup.getAllSwatches();
              swatchCount = swatches.length;
              var swatchIndex = Math.round(Math.random() * (swatchCount - 1)); // 0-based index
              // New swatch group does not allow patterns or gradients
              if (swatches[swatchIndex].color.typename != "PatternColor" && swatches[swatchIndex].color.typename != "GradientColor") {
                        swatchGroup.addSwatch(swatches[swatchIndex]);
                        i++;
    // Updates swatch list with swatches moved to new swatch group
    swatches = swatchGroup.getAllSwatches();
    // [… etc etc]
    AS
    tell application "Adobe Illustrator"
    activate
              set docRef to make new document with properties {color space:CMYK}
    -- Create a new SwatchGroup
              set swatchGroupRef to make new swatchgroup in current document with properties {name:"CreateSwatchGroup"}
    -- Get list of swatches in general swatch group
              set genSwatchGroup to swatchgroup 1 of docRef
    -- Collect 5 random swatches from the general swatch group and move to new group
              set i to 0
              repeat until i is 5
                        set swatchesRef to get all swatches genSwatchGroup
                        set swatchCount to count every item in swatchesRef
                        set swatchIndex to random number from 1 to swatchCount
                        set currentSwatch to item swatchIndex of swatchesRef
      -- New swatch group does not allow patterns or gradients
                        if class of color of currentSwatch is not pattern color info and class of color of currentSwatch is not gradient color info then
      add swatch swatchGroupRef swatch currentSwatch
                                  set i to i + 1
                        end if
              end repeat
    -- [… etc etc]
    If someone can help me to create the Swatch Array object of swatches loaded from a seperate document (or unique layer) then I think I can work my way to changing the fill on the existing paths (the nations in my map of Europe example).
    Would be very cool if I could detect neighbooring paths (nieghbooring nations in my map of Europe example) make sure the colour being assigned is not within a certain hue/CMYK range of the random colour and if it is rechoose random colour. I have no idea how to perform the logic of determining neighbooring paths in an Illustartor script. Anybody?!
    I'd prefer Applescript for sake of readiblity and also I'm learning AS ATM. Plus I'm using Script Debugger.app (which is excellent) to work with AS and I can't seem to run JSX scripts from within Extend Script Toolkit 2 (perhaps I need to make my scripts point to Illustrator?)
    But Javascript is okay if someone has this covered already :-)

    I would like to write some scripts for randomising the allocation of swatches to adjacent object.
    Example:
    Imagine a map of Europe and all her nation states/territories. I have a User Defined Swatch Library. I can open the AI document it was made from as I understand from this thread that having the swatches as objects on the page makes them easier to be referenced in a script. 
    I want to iterate through the selected objects and randomly assign one of the colours in the swatch document as a fill to each object. It would be great if hidden swatches (they are all small rectangular 'colour chip' filled paths) on page were not included in the reference swatches randomly choosen from.
    Iterating the selected objects I can do, but not sure what references I need to use to create an array of swatches to randomly choose from.
    I see I can make an array of swatches using the general swatch group from Adobe's CreateSwatchGroup scripts:
    JS
    var docRef = app.documents.add(DocumentColorSpace.CMYK)
    // Create a new SwatchGroup
    var swatchGroup = docRef.swatchGroups.add();
    swatchGroup.name = "CreateSwatchGroup";
    // Get list of swatches in general swatch group
    var genSwatchGroup = docRef.swatchGroups[0];
    // Collect 5 random swatches from general swatch group and move to new group
    var i = 0;
    while (i < 5) {
              var swatches = genSwatchGroup.getAllSwatches();
              swatchCount = swatches.length;
              var swatchIndex = Math.round(Math.random() * (swatchCount - 1)); // 0-based index
              // New swatch group does not allow patterns or gradients
              if (swatches[swatchIndex].color.typename != "PatternColor" && swatches[swatchIndex].color.typename != "GradientColor") {
                        swatchGroup.addSwatch(swatches[swatchIndex]);
                        i++;
    // Updates swatch list with swatches moved to new swatch group
    swatches = swatchGroup.getAllSwatches();
    // [… etc etc]
    AS
    tell application "Adobe Illustrator"
    activate
              set docRef to make new document with properties {color space:CMYK}
    -- Create a new SwatchGroup
              set swatchGroupRef to make new swatchgroup in current document with properties {name:"CreateSwatchGroup"}
    -- Get list of swatches in general swatch group
              set genSwatchGroup to swatchgroup 1 of docRef
    -- Collect 5 random swatches from the general swatch group and move to new group
              set i to 0
              repeat until i is 5
                        set swatchesRef to get all swatches genSwatchGroup
                        set swatchCount to count every item in swatchesRef
                        set swatchIndex to random number from 1 to swatchCount
                        set currentSwatch to item swatchIndex of swatchesRef
      -- New swatch group does not allow patterns or gradients
                        if class of color of currentSwatch is not pattern color info and class of color of currentSwatch is not gradient color info then
      add swatch swatchGroupRef swatch currentSwatch
                                  set i to i + 1
                        end if
              end repeat
    -- [… etc etc]
    If someone can help me to create the Swatch Array object of swatches loaded from a seperate document (or unique layer) then I think I can work my way to changing the fill on the existing paths (the nations in my map of Europe example).
    Would be very cool if I could detect neighbooring paths (nieghbooring nations in my map of Europe example) make sure the colour being assigned is not within a certain hue/CMYK range of the random colour and if it is rechoose random colour. I have no idea how to perform the logic of determining neighbooring paths in an Illustartor script. Anybody?!
    I'd prefer Applescript for sake of readiblity and also I'm learning AS ATM. Plus I'm using Script Debugger.app (which is excellent) to work with AS and I can't seem to run JSX scripts from within Extend Script Toolkit 2 (perhaps I need to make my scripts point to Illustrator?)
    But Javascript is okay if someone has this covered already :-)

  • Js import colour swatches from an other file

    Hi all
    I am trying to import the colour swatches from an other file into the current document.
    I was hoping this would be just like importing Par or Char Styles...
    ...    app.activeDocument.importStyles(_theFormat_, sourceFile, importPolicy);
    But I have so far had no luck.
    Can anybody give me some hints.
    Thank you very much
    Romano

    Hi Romano,
    Can you please try the below JS code, The code is just import the swatches from the desktop document onto the active InDesign document.
    var myColorDoc = new File("~/Desktop/color.indd");
    app.activeDocument.loadSwatches(myColorDoc);
    thx
    csm_phil

  • Create JPG files from a pattern

    Hello
    How to create JPG files from a pattern in Photoshop CC?
    I created a website where I used the pattern in the background, now I need a little bit of this pattern to be inserted into the stylesheet CSS. In earlier versions of Photoshop as I knew to do it.
    Thank you for your response.

    When i hovering in Preset Manager does not appear the pixel dimensions, I know this solution of the previous versions of Photoshop, but in photoshop cc does not work for me. Do you know of another method to check the pixel dimensions of the pattern?

  • Whats the math behind converting from square pixels to non-square...?

    Does anyone know the math behind resizing a video from square pixel to non-square?
    Say if I have a 720x480 4:3 video and I render it out as square pixels. So then I need to resize it down to non-square so that it will no longer be stretched....I know I can just use premiere or quicktime to scale it properly for me but what is the math behind it? I'll admit im no mathematician, all i know is that square pixels = 1 and dv = .9, how you go from there is beyond me.
    Reason I ask is because I have a 800x600 video in square pixels and just want to know how in the world it makes sense that you change it to 755x600 and the stretch is gone. How does do you get to that number?
    Many thanks in advance!

    I don't have CS4, and have only been scanning the CS4 forums; so there may be better links regarding this in this forum.  CS4 changed the par to a more "correct" option.  It is not .9 now but .91.  (See Dan's little "about" before the .9.)  And when you are dealing with 800x600, there may be other issues.
    I like the  AE/Meyers explanations of all this (so also see the regular help for Premiere):
    http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7f3aa.htm l
    There are 2 pdf article links on that page.
    Also see the free Meyers video on Lynda.com
    http://www.lynda.com/home/Player.aspx?lpk4=40550
    EDIT: I missed the more relevant thing in Dan's: see the 10/11 as the multiplier rather than .9?  10/11 is the "new" .909090 = .91.
    Message was edited by: Stan Jones

  • How to turn an image from square to oval? [was: Ps]

    I just typed this question but I'll do it again, I want to turn an image from square to oval for my business, it has to be 16x12 mm. Any help, I've been trying to do it for an hour now.

    Hi MouseCFK,
    The first five minutes of this video tutorial explain how to do just that:

  • Computer crashed; new C drive. How do I restore/recover my bookmarks on Sync? Would rather not start from square one.

    Computer crashed; new C drive installed. How do I restore/recover my bookmarks on Sync? Would rather not start from square one.

    Without the Sync Key, even if you could connect and download your data from the Sync server it would be useless without your Sync Key. The Sync Key is used to encrypt & decrypt the data going to & coming from the Sync server.

  • Pattern Swatch From Pattern Maker Filter

    Is there a way to copy a new custom Pattern Swatch that you create using the Pattern Maker filter? I have often created a pattern that worked perfect but could only apply it to a layer. I want to be able to save just the custom swatch that patterns correctly so that I can use it as a repeating background image on a website.
    I know I should know this, but it's something that I've never been able to figure out, or find in the Help Menu.
    Linda

    > Well, you could always open a new file the same size as the pattern you created originally and load it from the Layer Styles > Pattern dialog.
    For some reason it tiles right when I apply the pattern to a large background. But when I attempt to create a simple square tile, even the same size as I started with, and attempt to use it as a repeating background on a web page, you can see the tiling.
    > Or how about after you make a new pattern in Pattern Maker and OK it, you have it load into an open Photoshop window, yes? You know the size of the tile the pattern maker made. How about making a selection the same size and use the arrow keys to move it into place and then copy/paste a new doc.
    Sounds good on paper Welles. But I can't get it to work right. I still see the tiling when I save the file out this way and use it as a background.
    I don't need this for anything urgent. And I know I can make something work for when I need it. The pattern I'm working with has a lot of texture so when it repeats outside of applying it in Photoshop, it just doesn't match up right. I had hoped there would be an easy way to capture the custom Pattern Maker Tile as a single image that could be used to repeat itself without seeing the tiling.
    Maybe this would be a good feature request. Thanks for both of your input.

  • Why can't I pull my pattern swatch from the palette to the artboard?

    This is a new problem that I have never had before.  I want to alter the colors of my pattern. Typically, I pull it from the palette to the artboard, change my colors.. re-select the entire patterns repeat and drag and drop it back into the swatches palette. None of my layers are locked and all are visible.  What's the deal?  (iMac CS2)  (I have loaded up other files with patterns in them and it works just fine!)  (I have also quit .AI and reloaded the same file with the same problem.)
    Thanks

    THose phrases are explained in the manual:
    http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-62c7a .html
    https://helpx.adobe.com/illustrator/using/clipping-masks.html

  • How to obtain CMYK code from a pattern swatch?

    Anyone know how this can be done? when I click on a pattern swatch it says its cmyk is black (regarldess of the color it actually is).

    WHich version?
    If CS3 and above, apply the pattern to some object and then use Edit > Edit colors > Recolor art.
    or drag the pattern out of the swtches panel and then select the black objects.

  • How to get cross square pattern effect in AI?

    Hi Guys,
    Please see the following screen shot. This effect how I can get in Illustrator CS4? Since there is no direction I am drawing lines manually.
    FYI: I tried to create swatch for this. But not giving right results.
    So, I just want to know whether is there any way to get this effect easily or this is the only way what I have now?
    Please share your opinions.
    Thanks in advance.
    Regards
    HARI

    Hi Jacob Bugge
    Thanks for your reply. You mean that I did not create the swatch correctly?
    FYI: I crated swatch like, how Mike Gondek told.
       1. To make a pattern of this draw a square with no fill or stroke on top of your lines.
       2. Cut the square, select the lines, and use paste in back
       3. Select the lines and the square and drag this to your swatches palette, you will get a icon for a pattern swatch
    The empty square defines the bounding box for your pattern, and must be the backmost element in your selection.
    Hi Mike Gondek
    Could you please explain clearly, how I can use the Transform Effect. Because I do have different type of objects like following screen shot. If you see the marked red color area, for that how I can apply this transform effect.
    Regards
    HARI

  • What is the Scan from string pattern for "match everything" ?

    Hello,
    Using Scan from string for a while, I know that %s only matches string up to a whitespace. And I also thought %[^] would match everything including whitespaces. But it turned out that it would stop at the closing square brace.
    So, what is the real scan pattern for match everything including whitespaces ?

    What do you want the Scan From String to end on?  Or are you just grabbing the rest of the string?  If that is your scenario, then just use the "remaining string" output.  It might help if you give a full example of a normal input string and EVERYTHING you want as an output.

  • Possible to load swatch from file?

    Hi,
      I'm trying to simply create a rectangle and then fill it with a pattern that the user can specify but which is also loaded by the plug-in.  I'm pretty sure I can make the box and fill it easily enough with the AIActionManagerSuite. 
    I just have no idea how to get a custom pattern from a file into a swatch programmatically.  Any ideas?
    Thanks,
    Bill

    You can do it by specifing a path too. Combine what you have there with this:
    ASErr ASAPI(*
    ImportStyles )(const ai::FilePath& source, AIDocumentHandle *newdoc)
    Imports styles from a file, and creates a new document containing the styles.
    Assuming you feed it a valid path to a valid Illustrator file, that will return the handle to the document, but the document won't be displayed. From there, you can use GetSwatchList to pull out the list of swatches it contains
    There are a variety of APIs that let you specify a document handle and pull things like graphic styles, swatches, etc from them. It's quite useful! I only discovered this myself about a year ago, and it's let me do some wonderfully fun things!

Maybe you are looking for

  • Contact Photos Show Up with 10.4.3 Update

    I just updated to 10.4.3, and the contact photos show up. Apparently, the software is being updated, and Apple is listening. I'm sure there will be more updates for added functionality.

  • If I move from Firewire 400 to 800 will download speed of video increase?

    Hi, I have just upgraded from a MacMini (which had firewire 400) to a new iMac which only has firewire 800. I have a 3 year old JVC digital camcorder (GR-D340EK) with ilink out and previously used a Belkin cable to connect to my Macmini. My question

  • Database login freeze -----urgent

    Hi, I login to the database, sometimes it is OK, sometimes not. Now we have four database schema. Each database has this problem---when I login to the database, the screen freeze. Can anybody help me solve this problem ? Look forward to hearing from

  • Billing[release to accounting]

    dear all, i am stuck up with a small problem in billing i.e. after assigning the G/L accounts, i wanted to check weather the release of accounts is taking place or not, so i had a look on billing and clicked on the "release to accounting" then i came

  • Transfering files, settings, and everything else.

    this is a pretty cut&dry question i suppose. I'm planning on upgrading to a 24" iMac in the coming month. (Or should I wait until the new ones are announced? :P) I'm currently on my MacBook and was wondering if I'll be able to clone my MacBook onto t