[SOLVED] Bash changes consolle's colors by itself

Hi archers,
I've wrote a little script which ask for the result of a given random moltiplication because I was exercising with $RANDOM and something strange's happend.
No matter where I am (Tty, Tmux, Urxvt, Xterm...) Bash changes consolle's colors by itself if I do ^c to stop the script, instead of write a reply.
i.e.'s:
correct behaviour
$ 8 * 9 = ?
$ 72
$ ls
file in red file in yellow file in grey...
Wrong behaviour
$ 8 *9 = ?
$ ^c
$ ls
file in blue file in green file in white...
What the heck?
Bash version is 4.2.39(2)-release.
The script is the following:
while :
do
min="3"
max="7"
fat1="$(($RANDOM%$max+$min))"
fat2="$(($RANDOM%$max+$min))"
prod="$(($fat1*$fat2))"
echo "$fat1 * $fat2 = ?"
read res
while [ "$res" != "$prod" ]
do
echo "$prod"
echo "Insert the correct result."
tavPit
done
return 0
done
Everything is up to date.
.bashrc
[[ $- != *i* ]] && return
complete -cf sudo
[ -f /etc/bash_completion ] && ! shopt -oq posix && . /etc/bash_completion
[ -f ~/.bash/include ] && . ~/.bash/include
[ -e "$HOME"/.dircolors ] && eval $(dircolors -b "$HOME"/.dircolors)
include
#!/bin/bash
[ -f ~/.bash/alias ] && . ~/.bash/alias
[ -f ~/.bash/color ] && . ~/.bash/color
[ -f ~/.bash/export ] && . ~/.bash/export
[ -f ~/.bash/shopt ] && . ~/.bash/shopt
[ -f ~/.bash/stty ] && . ~/.bash/stty
[ -f ~/.bash/set ] && . ~/.bash/set
color
nc="\e[0m"
nbk="\e[0;30m"
nre="\e[0;31m"
ngr="\e[0;32m"
nye="\e[0;33m"
nbl="\e[0;34m"
nma="\e[0;35m"
ncy="\e[0;36m"
nwh="\e[0;37m"
bbk="\e[1;30m"
bre="\e[1;31m"
bgr="\e[1;32m"
bye="\e[1;33m"
bbl="\e[1;34m"
bma="\e[1;35m"
bcy="\e[1;36m"
bwh="\e[1;37m"
end="\[\e[m\]"
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[0;32m") \
LESS_TERMCAP_md=$(printf "\e[0;32m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;31m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;33m") \
man "${@}"
if [ "$TERM" = "linux" ]; then
echo -en "\e]P0000000" # Black.
echo -en "\e]P9ff0000" # Red.
echo -en "\e]PA00ff00" # Green.
echo -en "\e]PBffff00" # Yellow.
echo -en "\e]PC2b4f98" # Blue.
echo -en "\e]PDff00ff" # Magenta.
echo -en "\e]PE00ffff" # Cyan.
echo -en "\e]PFffffff" # White.
clear
fi
.dircolors
TERM linux
TERM linux+utf8
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM screen
TERM screen-256color
TERM xterm
TERM putty
EIGHTBIT 1
NORMAL 01;30
FILE 01;30
DIR 31
LINK 36
FIFO 03;33
SOCK 03;33
DOOR 32
BLK 32
CHR 32
ORPHAN 05;33
EXEC 33
.tar 31
.tgz 31
.arj 31
.taz 31
.lzh 31
.zip 31
.7z 31
.z 31
.Z 31
.gz 31
.bz2 31
.deb 31
.rpm 31
.jar 31
.rar 31
.xz 31
.jpg 35
.jpeg 35
.gif 35
.bmp 35
.pbm 35
.pgm 35
.ppm 35
.tga 35
.xbm 35
.xpm 35
.tif 35
.tiff 35
.png 35
.fli 35
.gl 35
.dl 35
.xcf 35
.xwd 35
.pdf 35
.ogg 34
.mp3 34
.wav 34
.mov 34
.mpg 34
.mpeg 34
.asf 34
.avi 34
.mkv 34
.wmv 34
.ogm 34
.C 37
.H 37
.c 37
.h 37
.cxx 37
.hxx 37
.cpp 37
.hpp 37
.py 37
.sh 37
.vim 37
.o 37
.so 37
.a 37
.ko 37
.rc 36
*rc 36
Thanks a lot.
Last edited by rix (2012-11-26 15:38:28)

Bandit Bowman wrote:My colours are unaffected after running the function. [...]
Here colors change when I send SIGINT to a running instance of my script; as said before.
Bandit Bowman wrote:[...] What does $LS_COLORS look like before and after? [...]
When everything is working right:
$ echo $LS_COLORS
$ no=01;30:fi=01;30:di=31:ln=36:pi=03;33:so=03;33:do=32:bd=32:cd=32:or=05;33:ex=33:
*.tar=31:*.tgz=31:*.arj=31:*.taz=31:*.lzh=31:*.zip=31:*.7z=31:*.z=31:*.Z=31:*.gz=31:
*.bz2=31:*.deb=31:*.rpm=31:*.jar=31:*.rar=31:*.xz=31:*.jpg=35:*.jpeg=35:*.gif=35:
*.bmp=35:*.pbm=35:*.pgm=35:*.ppm=35:*.tga=35:*.xbm=35:*.xpm=35:*.tif=35:*.tiff=35:
*.png=35:*.fli=35:*.gl=35:*.dl=35:*.xcf=35:*.xwd=35:*.pdf=35:*.ogg=34:*.mp3=34:
*.wav=34:*.mov=34:*.mpg=34:*.mpeg=34:*.asf=34:*.avi=34:*.mkv=34:*.wmv=34:*.ogm=34:
*.C=37:*.H=37:*.c=37:*.h=37:*.cxx=37:*.hxx=37:*.cpp=37:*.hpp=37:*.py=37:*.sh=37:
*.vim=37:*.o=37:*.so=37:*.a=37:*.ko=37:*.rc=36:*rc=36:
When texts change color (the strange behaviour):
$ echo $LS_COLORS
$
Bandit Bowman wrote:[...] Is this the whole script or just a snippet [...]
Whole.
Bandit Bowman wrote:[...] because I don't see anything that should modify it. [...]
That's why I'm asking.
Bandit Bowman wrote:[...] here's a slightly more straightforward version [...]
Thanks, I've learnt something.
Bandit Bowman wrote:[...] although it won't help with the colours.
Thanks for the reply anyway.
Bandit Bowman wrote:[...] English: [...]
Also, many thanks again.
Edit: solved. "$LS_COLORS" must be set if you want colors.
Last edited by rix (2012-11-26 15:38:06)

Similar Messages

  • Unable to change the background color of a webi report in the infoview

    Hi,
    Can someone please me help me with the below issue.
    Environment Details:
    BusinessObjects XI3.1 SP1SP2SP3                                                                               
    BusinessObjects XIR2 SP5                                                                               
    .Net infoview                                                                               
    IE 7                                                                               
    JRE versions used as;                                                                               
    On BOXI3.1 SP3 Server -1.6.0_03                                                                               
    On BOXIR2 SP5 Server -1.4.2_02                                                                               
    On the client machine   -1.6.0_14      
    Issue Description:
    -Open an existing webi report in the infoview.                                                                               
    -In the report,I am not able to change the background and the font color for the column headings from the properties tab in the left navigation panel.                                                                               
    -I can change the color after hitting the color tab for multiple times.Also the color was getting changed when the color code was manually changed.                                                                               
    -The reports background color was getting changed,but not the font color.                                                                               
    -I tried to create a test report,where I was able to change the color.                                                          
    I have;
    -Installed the Java update 14 on BOXI3.1 server machine,here I was  able to change the background and font color.
    -However on the client machine,with the same Java update 14,the background and the font color for the column headings was not getting changed.
    -Same behaviour is observed on BOE XIR2 SP5 machine.
    Is there any limitations for using Java update 14 or am I required to do any other settings.
    Regards,
    Pankaj

    Hi Pankaj,
    It is a strange behavior. You also stated that when you create a test report it works fine.
    Can you create a copy of this report and then try on the new copy?
    One thing you can do as a test to refresh the universe and then try it. And change some columns - add some column and then save and ten remove and save and make changes like this and trying changing color.
    I think there is a problem with this report this is why it is behaving like this on all machine.
    Regards,
    Bashir Awan

  • How do I change the background color of a row in a table indicator?

    Hello,
      How do I change the background color of a row in a table indicator? I know how to change the background color in a active cell, but that is not what I want. My first intent is to make the background color of the first row a unique color, such as green, just to highlight the top row of the table.
    Regards,
    Kaspar
    Regards,
    Kaspar

    I have done this before by using a for loop to change the active cell of a row in order to give the appearance that the whole row is turning the color at once.
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • Can i change the background color of a file from white?

    i want to change file backgrounds from bright white, to a more soothing color.

    Each program is different and do not always have controls to change the background colors.
    For jpg files view this:
    https://www.youtube.com/watch?v=u5-WmuLFHys
    or this for jpeg
    http://www.wikihow.com/Change-an-Image-Background-in-MS-Paint-(Green-Screen)
    or this for pdf
    http://sodapdf.com/blog/sodapdf-tutorials/how-to-edit-a-pdf-file/pages/how-to-add-or-replace-a-backg...
    or of a folder
    http://www.sevenforums.com/customization/336693-how-change-background-color-folders-windows-7-a.html
    Anything else, I can't help you.
    Please mark my post as SOLVED if it has resolved your problem. It helps others with similar situations.

  • How do I change the background color of a poster in pages?

    How do I change the background color using pages for ipad?  I am working with a poster template.

    I have done this before by using a for loop to change the active cell of a row in order to give the appearance that the whole row is turning the color at once.
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • How do you change the background color & font in a text-only popup?

    It has been ages since I did this and I can't seem to remember how. I tried to edit the style sheet but it only has options to change the text-only popup hotspot/link and I need to change the background color and font style within the popup itself. Tried Adobe's help but it had no answer for me. Any one out there know how to do this? I am running RoboHelp 7.

    By Popup do you mean a link that when clicked causes a separate topic to be displayed in a seperate window (popup) or Drop Down text?
    For Popups that are displayed in a new window then the font and colour is changed in the topic that is displayed. Simply open the topic and change colours / features as required
    If you are using drop down text and confusing this with a popup then the font and colour is changed when creating the drop down text. Right click the text and select Font to change colour etc.

  • [SOLVED]Can't set background color for Knotes

    Today I'm testing KDE 4.9.5 and the app Knotes start well, can add new notes, save them, etc, but it is not changing the background color of the notes...
    Here's the app log:
    ╒══[ /home/jairo ]══════╕
    └> knotes
    QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
    QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
    Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
    knotes(5896) ResourceLocal::ResourceLocal: ResourceLocal::ResourceLocal()
    knotes(5896) KNotesResourceManager::load: "Opening resource Notes"
    knotes(5896) KNotesLegacy::convertKNotes1Config: The file " "/home/jairo/.kde4/share/apps/knotes/notes/libkcal-122400669.545" " lacks version information but is not a valid KNotes 1 config file either!
    ╒══[ /home/jairo ]══════╕
    └> knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    knotes(5896)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer a qt_plugin_instance function.
    knotes(5896)/kdecore (KLibrary) kde3Factory: The library "/usr/lib/kde4/kcm_knote.so" does not offer an "init_kcm_knote" function.
    I'm googling  but can not find anything concrete
    Any help?
    Thank in advance
    EDIT:
    It was my mistake, the truth is that this application can change the background color, but does so in a cumbersome way.
    Each note can change the background color (individually) and to make it globally, you must remove all existing notes and the new notes then take the chosen color :S ...anyway.... issue solved
    Last edited by JohnnyDeacon (2013-02-01 16:02:47)

    bmishoe wrote:But all to no avail...I can click on the control and it changes from red to green, like I originally defined in the control.  Why can't I programatically change the color?
    It is probably more likely that your imported pictures are just covering the background of the button.
    A picture ring is the better way to go anyways.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • In Dreamweaver 6, I created a new fluid layout. I set up (4) DIVs. In the 3rd div, I changed the font color. The new color shows up on the website when viewed in my computer desktop, but, when viewed in a tablet and a cell phone, the color of the font doe

    In Dreamweaver 6, I created a new fluid layout. I set up (4) DIVs. In the 3rd div, I changed the font color. The new color shows up on the website when viewed in my computer desktop, but, when viewed in a tablet and a cell phone, the color of the font does not change. It's the same in Dreamweaver's Live view. It shows the new color on Desktop view and not in the cell phone or tablet view. Also, I changed the font itself in one of the DIVs and it shows up in the new font on the desktop view and website viewed thru the computer, but, not on the tablet or cell phone. Can someone please explain. I want to be able to change the fonts and colors for viewing in the tablet and cell phone, also. The fonts were all standard fonts. Sans-erif and Verdana and Arial were tried. Thanks.

    I will lock this discussion because of duplicate post.

  • Change selected tab color theme

    I'm trying to make a small adjustment to my color theme. If you have used X-Chat Aqua, you'll notice that in the Blue OS X color theme, highlighted tabs are in blue, and easily identified. However, when the color scheme is grey, highlighted tabs are in a slightly darker grey, so I have to tilt my display back and forth to tell which tab is the active one. I prefer the grey theme, but want to change the highlighting color of the active tab. This does not have anything to do with the highlighting color in the OS X settings as I already have that set to turquoise. Does anyone know how to change this? Someone suggested Magnifique, but that seems like it will only install a whole new color theme, not let me change individual settings as I desire. It seems as though I can create my own color scheme, but that I would have to start from scratch, when really I'd want to start with the OS X graphite theme, because that one works just fine for me, with the exception of the active tab color for certain applications. Anyone know how to solve this one?
    Thanks for the help.

    I'm trying to make a small adjustment to my color theme. If you have used X-Chat Aqua, you'll notice that in the Blue OS X color theme, highlighted tabs are in blue, and easily identified. However, when the color scheme is grey, highlighted tabs are in a slightly darker grey, so I have to tilt my display back and forth to tell which tab is the active one. I prefer the grey theme, but want to change the highlighting color of the active tab. This does not have anything to do with the highlighting color in the OS X settings as I already have that set to turquoise. Does anyone know how to change this? Someone suggested Magnifique, but that seems like it will only install a whole new color theme, not let me change individual settings as I desire. It seems as though I can create my own color scheme, but that I would have to start from scratch, when really I'd want to start with the OS X graphite theme, because that one works just fine for me, with the exception of the active tab color for certain applications. Anyone know how to solve this one?
    Thanks for the help.

  • Solaris 10 - Changing default screen color depth

    Hello,
    I just upgraded a Sun Blade from Solaris 8 to 10. I have a rather old image display application (ftp://east.la.asu.edu/pub/software/pw-5.23.tar.gz) that is absolutely essential for my work, and it will not run under Solaris 10, either on the CDE or jave/gnome desktops.
    The executable for this application was compiled using gcc on Solaris 8, and ran fine on Solaris 8 CDE (v1.4.3?) with the "Most colors for applications" color setting in Desktop Color prefs. With that setup, the application allocated 216 colors when starting up, which was sufficient. If the application could not allocate enough colors, it would use its own private color map, which caused window "flashing," but that was OK.
    Under Solaris 10 CDE (v1.6.3) and gnome, the application cannot allocate enough colors, and cannot even start with its own color map.
    I re-complied the application on Solaris 10 using Sun Studio 11, and the same problem occurs with the new executable.
    I think that the problem may be related to default color depth. Right now, with xwininfo, my Solaris 10 CDE xterms are 24-bit true color. Unfortunately, I think that I may need to set my default color depth to 8-bit pseudocolor for the application to run. How can I change the default color depth of the CDE and gnome desktops to pseudocolor? I know that the application works on HP-UX CDE with the default depth as pseudocolor.
    I cannot remember if I had somehow changed the settings for color depth on Solaris 8 to get the application to run. I do know that the xwininfo results for a Firefox browser window running on my Solaris 8 CDE desktop was 24-bit true color. I hope very much that this will be the case if I change my default depth to 8-bit on Solaris 10.
    Any help that anyone can provide would be GREATLY appreciated. I am dead in the water without this imaging application. I am a member of the Sun Developer Network, and I don't know if I should post this message somewhere on the Developer Forums. Please let me know if I should.
    Thank you in advance!!!!!

    Hi,
    In my first post there is a link to the code I am talking about. The code is public and available. It was created by Noel Gorelick at ASU. It is based on having an 8-bit Xserver running. There are few users of this code, but I completely agree with you that a new generation of unix-based imaging code needs to be developed that is system and Xserver independent. Optimal code should detect screen depth and open windows with desired color depth automatically, without "flashing.". That way, it could even run under Gnome, which allocates all but 18 8-bit colors for the desktop. Under CDE, the code allocates 224 colors for itself, which is great. The above code will create its own colormap if it cannot allocate enough colors, but there is flashing in that case. Have at it if you wish.
    Best regards,
    Sparcmaster

  • How do you change the background color not of the video clip, but the background the clip is on?

    How do you change the background color upon which the clip resides...
    I don't want to change anything within the clip itself, but the matte(?)
    from black to white or cream.
    I am working with Elements 10...

    Create a color matte of the desired color and place it on video track 1.  Then place your video on track 2.
    from here: Adobe Premiere Elements Help | Creating specialty clips
    Create a colored matte for a background
    You can create a clip consisting of a full‑frame matte of solid color, which you can use as a solid background for titles or animated clips.
    Brightly colored mattes can serve as temporary backgrounds to help you see transparency more clearly while you adjust a key effect.
    Click Project Assets. 
    In the Project Assets panel, click New Item from the panel options and choose Color Matte. 
    Choose a color in the Adobe Color Picker dialog box, and click OK. 
    A color matte clip is placed into both the Project Assets panel and the Expert view timeline.

  • Change stage background color

    I'm wondering if there's a way to change the background color
    of the area behind the stage. On my monitor, it's a little hard to
    tell the difference between the white and light gray.
    Thanks.

    Sorry, I guess I wasn't clear.
    While working in Flash, I have a hard time distinguishing the
    stage from the area around it. I know how to change the background
    color, but want to know if there's a way to change the color of the
    area around it instead. I'm guessing there isn't, as it seems it
    would have presented itself in the menus I've looked in by
    now.

  • Change sidebar background color

    First, themes do NOT solve this problem.
    I want to change the background color of the bookmark- and history sidebar. Changing themes does NOT change that background color - at least none of the 100 or so that I tried.
    I asked Google, but nothing seemed to match, which is strange, I'd think LOTS of people would ask this (I'm usually LAST asking for any GUI changes, I always use what is there without changing a thing, but this light gray background is a bad fit for most websites right next to it).

    This code in '''userChrome.css''' will do that. Change the color code to what you want. <br />
    <pre><nowiki> #bookmarks-view, #historyTree {
    background-color: #DDDDDD !important;
    } </nowiki></pre>
    http://www.w3schools.com/cssref/css_colors.asp
    http://kb.mozillazine.org/UserChrome.css
    This add-on makes it quite easy to work with the 3 "user" files. <br />
    http://webdesigns.ms11.net/chromeditp.html

  • Changing transparency background color on PNG thumbnails??

    Okay so I don't know if this is possible but I would like to be able to change the transparency color on my PNG file thumbnails. Right now the background is black but when I open the file it is white in iphoto or transparent in adobe. It's not a HUGE deal but it does kind of suck when the image itself is black and then I can't tell what the image actually looks like just by looking at the thumbnails. Any help would be great!! Thanks!

    Jamie P:
    Welcome to the Apple Discussions. The color that the transparency displays if a function of the application displaying the file and, in iPhoto, is set by iPhoto. It's just the nature of the beast. You can put in a feature request at http://www.apple.com/feedback/iphoto.html.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Is there a way to change the Layer Color Tag via Script?

    I tried to use the Script Listener to find the Event to change the Layer Color Tag but there were no commands recorded to my desktop. I have scoured the forums and the depths of Goooooo....ooogle and to no avail.
    I checked the API for an Art Layer and found no options to assign a Color Tag.
    I want to change the Color Tag From:
    To Color Tag Purple:
    Could anyone please help point me in the Right Direction?

    Just solved my own question:
    Photoshop was being weird so I had to change the color 2 times for the event to be recognized...idk why but it worked: heres the code:
    desc66.putReference( idnull, ref55 );
        var idT = charIDToTypeID( "T   " );
            var desc67 = new ActionDescriptor();
            var idClr = charIDToTypeID( "Clr " );
            var idClr = charIDToTypeID( "Clr " );
            var idVlt = charIDToTypeID( "Vlt " );
            desc67.putEnumerated( idClr, idClr, idVlt );
        var idLyr = charIDToTypeID( "Lyr " );
        desc66.putObject( idT, idLyr, desc67 );
    executeAction( idsetd, desc66, DialogModes.NO );

Maybe you are looking for