Results 1 to 10 of 17

Thread: change color of text in shell

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    145

    Default change color of text in shell

    Is there a way to change the color of the font to neon green?

  2. #2
    Developer balding_parrot's Avatar
    Join Date
    May 2007
    Posts
    3,399

    Default

    Quote Originally Posted by unlazyfree View Post
    Is there a way to change the color of the font to neon green?
    For someone who is unlazyfree you sure didn't do much searching, did you ?

    have a looksee here

  3. #3
    Member
    Join Date
    Jul 2007
    Posts
    145

    Default

    Quote Originally Posted by balding_parrot View Post
    For someone who is unlazyfree you sure didn't do much searching, did you ?

    have a looksee here
    from what I read in there, it only would change the color of the bt ~#, not the entire text. I wanna keep the color of the bt ~# and change the output text color

  4. #4
    Developer balding_parrot's Avatar
    Join Date
    May 2007
    Posts
    3,399

    Default

    The colourful pic at the top of the page and the script at the bottom seem to indicate otherwise.
    Text Properties

    As previously mentioned, the '0' after the first escape sequence is the default color setting for the text of the shell prompt. For the text properties the following values make sense: 0, 1, 22, 4, 24, 5, 25, 7, 27 with the following meaning: default, bold, not bold, underlined, not underlined, blinking and not blinking, invers, not invers.

    With the help of the following short script we can have a look at the color combinations.
    Code:
    #!/bin/sh
    ############################################################
    # Nico Golde <nico(at)ngolde.de> Homepage: http://www.ngolde.de
    # Last change: Mon Feb 16 16:24:41 CET 2004
    ############################################################
    
    for attr in 0 1 4 5 7 ; do
        echo "----------------------------------------------------------------"
        printf "ESC[%s;Foreground;Background - \n" $attr
        for fore in 30 31 32 33 34 35 36 37; do
            for back in 40 41 42 43 44 45 46 47; do
                printf '\033[%s;%s;%sm %02s;%02s  ' $attr $fore $back $fore $back
            done
        printf '\n'
        done
        printf '\033[0m'
    done

  5. #5
    Junior Member
    Join Date
    Jul 2007
    Posts
    40

    Default

    I hadn't even cared much about this but thanks to you parrot I played with it for a good 20 minutes. :P Seems to work as described.
    --
    "Linux is user-friendly. It's just very selective about who its friends are."

    "Linux users swear by their OS, and Windows users swear at their OS."

  6. #6
    Developer balding_parrot's Avatar
    Join Date
    May 2007
    Posts
    3,399

    Default

    Quote Originally Posted by operatorone View Post
    I hadn't even cared much about this but thanks to you parrot I played with it for a good 20 minutes. :P Seems to work as described.
    Don't blame me my input to this was 15 seconds to find the page to answer the original posters question and another 20 seconds creating the post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •