How can I clean the unwanted spot?
I want to take the colors of my drawing and convert them to spot. I would put these tones on a group of custom colors. However, after I did my approach, I have 2 exact same tones in my color chart, as the image below.
I want to get rid of one outside the swatch group (one that the yellow arrow pointing towards). However, if I
app.activeDocument.spots[0].remove()
two of them disappeared.
Here are my steps of creating the color of the work task:
1. target the work I want to convert color;
2. create a new instance of the Spot on the document because the place is not a public constructor;
3. create a new color whose RGB values are the same as the filling of the work;
4. create a new instance of SpotColor;
5. set the spot on SpotColor instance property and property of color on the property of Spot;
6 Add the SpotColor instance for the swatch group.
7. the work instance SpotColor fillColor value.
And here's the code.
var doc = app.activeDocument; var layer = doc.layers.getByName('art'); var rect = layer.pageItems.getByName('rect'); var newRGB = new RGBColor(); newRGB.red = rect.fillColor.red; newRGB.green = rect.fillColor.green; newRGB.blue = rect.fillColor.blue; var newSpot = doc.spots.add(); newSpot.name = 'R=' + newRGB.red + ' G=' + newRGB.green + ' B=' + newRGB.blue; newSpot.color = newRGB; var newSpotColor = new SpotColor(); newSpotColor.spot = newSpot; newSpotColor.tint = 100; var newSwatch = doc.swatches.add(); newSwatch.color = newSpotColor; var swatchGroup = doc.swatchGroups.getByName('my_color'); swatchGroup.addSwatch(newSwatch); rect.fillColor = newSpotColor;
AHA! It's actually giving you the desired result: Add the newly created directly in the swatchGroup place using the addSpot command, it seems that there is no need of adding a nuance to the document first.
function test(){ var doc = app.activeDocument; var layer = doc.layers.getByName('art'); var rect = layer.pageItems.getByName('rect'); var newRGB = new RGBColor(); newRGB.red = rect.fillColor.red; newRGB.green = rect.fillColor.green; newRGB.blue = rect.fillColor.blue; var newSpot = doc.spots.add(); newSpot.name = 'R=' + newRGB.red + ' G=' + newRGB.green + ' B=' + newRGB.blue; newSpot.color = newRGB; var newSpotColor = new SpotColor(); newSpotColor.spot = newSpot; newSpotColor.tint = 100; var swatchGroup = doc.swatchGroups.getByName('my_color'); swatchGroup.addSpot(newSpot); } test();
Tags: Illustrator
Similar Questions
-
How can I clean up unwanted files myself?
How can I clean up unwanted files myself? I seem to be getting much, would it be because im always install stuff and then uninstall. Last night, I deleted 250 very tedious 900 junk folders. Oh, I wxp8 {sp3}.
Hello ROXANNETUOMI,
For the problem you describe, I suggest posting this question on the link below. Please indicate what type of email that you use.
Microsoft Answers:
http://answers.Microsoft.com/en-us/Windows/Forum/networking
Or if you use Hotmail, please see below:
The question you have posted is bound using Windows Live (hotmail) and would be better suited in the Center to help Windows Live Hotmail. Please visit this link to find a community that will provide the support you want.
-
I bought a used laptop and the previous ovner couldn't remember his password since it's been more than a year she opened a session. How can I clean the computer and restore it to that only programs that comes with it when buying or facotry settings. It's a HP Pavilion dv4000 with windows xp? I have not all discs.
Go here: http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00006110&tmp_task=useCategory&cc=us&dlc=en&lang=en&lc=en&product=464513 and click on the link that best matches your computer (e.g., Presario, Pavilion and HP Compaq Business PC manufactured and sold in 2006 or later).
Assuming that your computer is 2006 or later, following the links eventually will lead you to the following directions:
Reformatting a hard drive should be considered a last resort to solve a problem with a computer system. The hard drive can be reformatted and reinstalled the operating system, using the system PC Suite hard disk recovery. Reformatting the hard drive will overwrite all data on the disk. To preserve the data, back up the data of the user as; letters, leaves of calculation, graphics and emails to an external storage device before you reformat the disk. If the PC does not work in the Windows operating system, see reformatting since the recovery disks .Do the following to reformat the hard drive and reinstall the operating system.- Connect the PC to the power adapter.
- Close all programs.
- Click Start , click principally made programs , select System Restore and click on the PC recovery .
- When the recovery options are offered, select the option to perform the Recovery of PC and click Next .
- The PC will restart.
- When the recovery of the PC of welcome message, click OK to continue.
- In the system recovery Panel, select System Recovery . By default, the system will perform a complete reformat and will destroy all user data.
- Restart the PC when prompted.
As alternative method for the steps above, click Advanced Options , select the destructive recovery option and click Next to begin the reformatting process.The PC is in original factory State and all data in the system, such as the place and the date must be reconfigured.NOTE: any software "trial offer" has been included in the original factory image, it will be reinstalled, but it won't work (the test period will have expired). If so any trial software is a security antivirus software or others, before connect you to the Internet, you must uninstall (using an uninstall tool provided by the manufacturer if available antivirus software) and then install your own anti-virus software. So, you should download the uninstallers necessary and installers (or buy the software on CD) using another machine before starting this project.
NOTE 2: See the following important tips from MS - MVP PA supporter (once the restore is complete, click Start > run > winver > OK to determine what Service Pack you have):
HOW TO get WinXP SP1 or SP2 fully patched after a 'clean install': http://groups.Google.com/group/Microsoft.public.WindowsXP.General/MSG/a066ae41add7dd2b
1. download & save the installer for WinXP SP3 on your desktop:
http://www.Microsoft.com/downloads/details.aspx?FamilyId=5b33b5a8-5E7...[Yes, you can jump SP2 if you run WinXP SP1.]
2. read & take into account:
http://msmvps.com/blogs/harrywaldron/archive/2008/05/08/Windows-XP-SP...3 connected as long as administrator, if necessary, double-click the saved file to install WinXP SP3. Follow the prompts. Be patient and restart twice when the installation ends.
4. make the resolution method 2 here (believe me):
http://support.Microsoft.com/kb/9431445. go to http://windowsupdate.microsoft.com . Install all required software, and then click CONTINUE. Select CUSTOM and scan | Install the critical updates of security offered. Still, follow all the instructions.
[I do NOT recommend install IE7 through Windows Update.]
6. make sure that automatic updates is enabled; FC.
http://support.Microsoft.com/kb/306525Other references:
Free unlimited installation and compatibility support is available for Windows XP, but only for the Service Pack 3 (SP3), until April 14-09. Chat and e-mail support is available only in the United States and the Canada.
Go to http://support.microsoft.com/oas/default.aspx?gprid=1173 . Select "Windows".
XP"and select"Windows XP Service Pack 3 "5 steps to help protect your new computer before going online
[installation clean = new computer]
http://www.Microsoft.com/protect/computer/advanced/XPPC.mspxMeasures to help prevent spyware
http://www.Microsoft.com/protect/computer/spyware/prevent.mspxHow TO get Windows XP Gold fully patched: http://groups.Google.com/group/Microsoft.public.windowsupdate/MSG/3f5afa8ed33e121c
1. download & save the WinXP SP2 installer on your desktop:
http://www.Microsoft.com/downloads/details.aspx?FamilyID=049c9dbe-3b8...[Yes, you can jump SP1]
1B. download & save the installer for WinXP SP3 on your desktop:
http://www.Microsoft.com/downloads/details.aspx?FamilyId=5b33b5a8-5E7...2. read & take into account:
http://msmvps.com/blogs/harrywaldron/archive/2008/05/08/Windows-XP-SP...3. administrator, if necessary, double-click the saved file to install Windows XP * SP2 *. Follow the prompts. Be patient and restart twice when the installation ends.
3B. logged on as administrator, if necessary, double-click the saved file to install WinXP SP3. Follow the prompts. Be patient and restart twice when the installation ends.
4. make the resolution method 2 here (believe me):
http://support.Microsoft.com/kb/9431445. go to http://windowsupdate.microsoft.com . Install all required software, and then click CONTINUE. Select CUSTOM and scan | Install the critical updates of security offered. Still, follow all the instructions.
[I do NOT recommend install IE7 through Windows Update.]
6. make sure that automatic updates is enabled; FC.
http://support.Microsoft.com/kb/306525References with dubbing:
Free unlimited installation and compatibility support is available for Windows XP, but only for the Service Pack 3 (SP3), until April 14-09. Chat and e-mail support is available only in the United States and the Canada. Reach
http://support.Microsoft.com/OAS/default.aspx?gprid=1173 | Select "Windows".
XP"and select"Windows XP Service Pack 3 "Protect your PC!
http://www.Microsoft.com/athome/security/computer/default.mspxLearn how to protect your PC by taking the three simple steps
http://www.Microsoft.com/downloads/details.aspx?FamilyId=3AD23728-497... -
How can I clean the accumulation of dust on the Satellite?
The laptop is pretty hot - how can I clean dust accumulation.
Hello
If you want to clean the fans if the vacuum cleaner is a good tool.
But be careful. If you n? t know how to do this, you should ask the Toshiba service partner for details. Guys have more experience of these things. -
How can I clean the keyboard on Satellite A210-127?
After a week of use for non computer keys on my keyboard "cvbn_" became sticky (but still working)? What I need to replace the keyboard, or I can clean it by myself? Please tell me * how can I under key *? Do I have to remove all the computer or the buttons are removable?
Due to the non - using sticky keys. Very strange! I was three weeks on holiday and none of the keys on the keyboard are sticky.
Anyway, unique key can be disassembled and if they are sticky because of the separation of coke inside or something similar I don't think you can clean it properly.
Want you can do is to remove the plastic cover and watch what happens with the little mechanism under the lid. Place again put it in the right of the cover place and push down, but gently. You will hear a click and the cover should be in place again. You can remove this cover for each unique key.Check it out!
-
How can I clean the radiator and the fan on my Equium L20?
3 years I've had it now, and I think he needs a cleaning.
The tutorials to open it, or how to access the fan and the heat sink?Hello!
It of not necessary to disassemble the laptop. This should be done by a technician for laptop.
To clean the radiator and fan, you can use compressed air jet or something else and could blow the dust from the fan.
You will get no tutorials or manual how to take apart Toshiba notebooks only FSA (authorized service provider) have some guides.
Good bye
-
How can I clean the Bitmap Images imported
Hi, I am using Flash 5. I have imported a .png image sequence and they look pretty rough and bitmap so I wanted to clean them.
1. what I have to select each frame after import and adjust the settings of the bitmap for each image or I can doo this somewhere so it affects al images?
2. I can't find the settings to clean up the bitmaps. I thought they would be in the Panel "Properties"?
3. is it possible to set the pixelation or clean a .swf imported or is it better to clean the sequence before you save it as a .swf?
Ideally, you should have images cleaned / correctly size / optimised before import you them into Flash. Once they are in Flash, one thing that you can do that can help how the image appears, especially if manipulate you its size in Flash, is to set the image to allow smoothing. This can be set using code or can be applied manually to the image in the library do a right-click, selecting Properties and by checking the option to allow smoothing.
-
How can I clean the bookmarks dropdown?
Over time, I gained a lot of undergrowth and shit in the bookmarks dropdown. I've deleted most. But there are still two problems.
(1) < < search | Firefox Help > > lines and there are a lot of them (I don't know why) will not disappear when I right click and click on delete.
2) there are dozens, perhaps hundreds, of blank lines. They are useless and clutter my HTML backup.
How can I get rid of these two irritants?
Thank you.
Budd
One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.
-
How can I clean the app Gallery?
I recently connected the phone to my computer in the data transfer mode (see the SD card as a windows device). Here, I cleaned the .dcim file: moved and deleted hundreds of photos.
But the Gallery still show them all as being on the phone. They appear in the comprehensive view with the version of the 'icon '. But the real pictures are of course not.
I can't get rid of icons or different index tags. For deleted photos option delete is simply not there.
Delete is only one possibility for images that are still on the device.
Hi andershl,
Please go to settings--> applications--> applications--> all--> storage media
Here, press clear the cache and delete data.
This will remove the storage media library, but not the actual files. Restart the phone and give him five minutes to rebuild the media library.
If it worked then your phone should display your photos properly again.
See you soon,.
Nicole
-
How can I clean the remains of unwanted downloaded software files?
as the remains of pieces of files
Hello!
You posted in the wrong forum, I'm afraid, because you don't really have a problem with the malware (unless this unwanted software is malware).If this is not malware, you can not be helped here.However, I would recommend looking up the software name in 'computer '. If you see "Softwarename'log or something like that, you can delete it as long as you are sure that it is nothing important to do with existing programs or your operating system." -
Acer Aspire 481TG-M5. How can I clean the fan?
Hi all
Until recently my laptop was automatically shut down and the fan makes a noise excessive even when I'm not under what whatsoever. My guess is that dust in the fan should be cleaned, but I'm not sure how to clean since it is a monohull. Any ideas? I tried the google search, but the only thing that comes up is how to clean a Macbook.
I have attached the links for instructions, video is for M5-581TG, but both look like. HTH.
-
How can I clean the sides of my mouse rubber?
I have the MS Wireless IntelliMouse Explorer 2.0. I have about 2 years. The rubberized sides became tights/pantyhose. What can I use to clean? The mouse works fine; It's the texture of the handles that is gross.
Kirstin McDonald,
Thank you for visiting the Microsoft Answers community forum.On hard plastic parts, you can use any kind of cleaner household soft on a soft cloth, never spray anything directly on any electronics. You can get special cleaners to computer / electronic stores, but they are fundamentally very different from your common all-purpose cleaner. Never use something hard that break down the plastic. The soft rubber surfaces, to be more prudent to use something very gentle like a gentle liquid hand SOAP, just a tiny DAB on a cloth of web. Or try these pre-humidifiees hand wipes. If there is enough soft to wipe their hands with, then it should be safe for the mouse. If the rubber started falling and sticking, do not try to clean it up, it's time to get a new mouse.
I hope this helps.
Thank you, Gloria
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
How can I clean the data which are drawn upward during the filling of fields?
For example, when I start typing my e-mail address I get a few suggestions that have been misspelled errors. Thank you
Depends on what browser you use the approach. Set your browser to clear 'Saved historical form' it will clear.
-
How can I clean the file deleted? All started doing this! don24
WHEN I CLICK ON DELETED ITEMS RIGHT
'EMPTY DELETED ITEMS' FOLDER BOX GOES UP. I CLICK ABOVE
THEN I CLICK ON 'YES' "ARE YOU SURE YOU WANT DLET"FOLDER OF THE DELETED ELEMENT CONTENT.
BOX COMESUP "UNKOWN ERROR HAS OCCURRED." IT WILL NOT REMOVE THE 'DELETED ITEMS FOLDER.
HELP, HELP, HELP
THIS JUST STARTED THIS AFTER YEARS OF NO PROBLEMS
lee24don
What is Windows Mail? Try to compact and repair the database. -
How can I remove the unwanted plugins?
s/o...
See:
Firefox 8
Maybe you are looking for
-
Options-use current pages now let the tab options
When I click on use current pages, the page option now remains as a current page.
-
BP-688e67d3-43C5-4B11-97e0-52d782141108
I did not notice when it really started. Firefox starts in SafeMode only. If I closed firefox or restart my firefox to system cannot be started in safe mode. Reset cause firefox crashes. I updated firefox, my windows system and my Add ons.
-
Mail does not display the mailbox
After a few computer problems, I wiped my own PowerMac and started from scratch with a clean install of El Capitan. I have half a dozen emails, and trying to think ahead, I made a backup of the Mail folder that is located in the library of the 'hidd
-
I have a new Dell with windows 8. hp officejet 5610 all-in-one seemed fine, and I could scan and print. Now, I can scan is no longer. charms - settings - change the settings of Pc - peripheral watch HP Office Jet 5600 offline! He could have an upd
-
LifeCam Cinema installs on Windows 7 64 bit - "the unit must be plugged.
Separated from this thread. Hello Yes, I got the latest version of the software. I also tried all the sugested fixes in the file as sugested elsewhere on this forum and help. It's weird the sound works but not the video. I should add that this is the