Komodo/Colors

From Botdom Wiki
Jump to navigation Jump to search

Komodo is different from other bots in that it has some unique features that separate it from other dAmn bots. One of the major unique features Komodo has is the use of Colors in the bot's Command Prompt window, instead of just boring black and dull white. Best of all, these colors are completely customizable.

Color Customization

2.02 and up

IMPORTANT: THE /COLOR COMMAND DOES NOT WORK IN 2.59, USE THE SYSTEM BELOW!!


Color Customization has changed since the first public release of Komodo. in 2.01, you had to open up Config.py in order to edit the colors, or any other options for that matter. In 2.02 and beyond, the color customization is done right in the console window, using thing /colors command. Typing '/colors' shows you your current color settings, and typing /colors colortype COLOR1 COLOR2 will change the colors of that part of Komodo.

Options

The available items you can change the color of are as follows:

  • Background, which only requires one color - '/colors background red' will change all of the background colors in Komodo to red
  • Banner, which will change the color of the welcoming banner at the top of the console window
  • Timestamp, the color of the timestamps at the left side of Komodo
  • Chatroom, the color of the chatroom names
  • Message, the color of chatroom messages
  • Joining, the color of people joining and leaving and a couple other chatroom events
  • System, the color of system messages
  • Error, the color of error messages
  • Gecko, the color of what you are typing and the color of most gecko command results
  • Hilight, the color of a message with your username in it
  • Userhilight, the color of a message with a different users name in it as defined by the /hilight command
  • bars, the color of the | separators in messages - only in 2.5 and up

Usage

When you change your colors, the first color is the background of that particular text, and the second is the foreground or the text itself. Hilighted messages by default are YELLOW and CYAN, for example. so to change that to something else you would say:

  • /colors hilight lightred black and it will make hilighted messages light red and black.

When you change the entire background color with '/colors background COLOR', you will be changing the background color of everything else's background colors that match it. So, when you type /colors background black, assuming you have default colors, it will change every background color except for Hilight, which will remain yellow, and Banner, which will remain grey.

Lastly, there is a schemes option in Komodo 2.5 and up:

  • /colors schemes will list what schemes you have.
  • /colors schemes save SchemeName will save your current scheme as SchemeName.
  • /colors schemes load SchemeName will load that scheme as your colors.
  • /colors schemes default will restore Komodo to it's former glory.


The available colors that you can use are: BLUE, LIGHTBLUE, CYAN, LIGHTCYAN, RED, LIGHTRED, GREEN, LIGHTGREEN, MAGENTA, LIGHTMAGENTA, DARKGREY, LIGHTGREY, YELLOW, BROWN, BLACK, WHITE.


In Komodo 2.59

Customizing your window colors is quick and easy. First of all, open up Gecko.py in a text editor like Notepad or Notepad++. Scroll down until you see the following:

<python> class IO(Thread):

   # Transfers text to WConio's color values
   R_WColors, Colors = {}, {}
   
   default_background = cons.BG['WHITE']
   _defaultcolors = {
      'Banner'     : cons.BG['SILVER'] | cons.FG['NAVY'],
      'Timestamp'  : default_background | cons.FG['NAVY'],
      'Chatroom'   : default_background | cons.FG['NAVY'],
      'Message'    : default_background | cons.FG['TEAL'], 
      'Joining'    : default_background | cons.FG['GOLD'],
      'System'     : default_background | cons.FG['GRAY'], 
      'Gecko'      : default_background | cons.FG['BLACK'],
      'Error'      : default_background | cons.FG['MAROON'], 
      'Hilight'    : cons.BG['YELLOW'] | cons.FG['TEAL'],
      'Bars'       : default_background | cons.FG['BLACK']}</python>

It is fairly straightforward. All you need to do is change the different values to whatever color you want that is in the list. The first value is the background, and the second value is the text color. You may notice that there is no BG in some of them, that is because some of the items here do not need a background value.

Lets say that you want to make the text of hilights black with a green background instead of cyan with a yellow background. The color of hilights part would then look like this: <python>'Hilight' : cons.BG['GREEN'] | cons.FG['TEAL'],</python>

You can experiment with all sorts of different color combinations, and make your Komodo window look however you want it to.

Credits

Komodo uses the WConio module to edit the colors of the window.