Thread: Colour [color] values...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    8

    Red face Colour [color] values...

    I know how to change the colors of text and all but how do u know the color values like:
    1 for red (Just as an example.]
    THanks.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Here are the 16 colors allowed in standard text modes in DOS.

    0 - Black
    1 - Blue
    2 - Green
    3 - Cyan
    4 - Red
    5 - Purple
    6 - Brown
    7 - Dull white
    8 - Grey
    9 - Light blue
    10 - Light green
    11 - Light cyan
    12 - Orange
    13 - Light purple
    14 - Yellow
    15 - Bright White

    Notice that normal colors+8=brighter colors. Can use this to create shadows for text windows.

    Black+8=Grey
    Blue+8=Light blue
    etc.

    If you want to put values directly into text video RAM, I forget the formula for the colors. Something like ForeGround*16+BackGround......but not sure.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-30-2007, 10:08 AM
  2. Need help with project
    By chrisa777 in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2006, 05:01 PM
  3. Replies: 2
    Last Post: 03-24-2006, 08:36 PM
  4. DirectDraw colour matching
    By Hunter2 in forum Game Programming
    Replies: 2
    Last Post: 12-10-2002, 02:17 PM
  5. Colour theory... (weird title)
    By Magos in forum C++ Programming
    Replies: 5
    Last Post: 11-25-2001, 04:16 PM