Colour [color] values...

This is a discussion on Colour [color] values... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I know how to change the colors of text and all but how do u know the color values like: ...

  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
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    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, 09: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, 07:36 PM
  4. DirectDraw colour matching
    By Hunter2 in forum Game Programming
    Replies: 2
    Last Post: 12-10-2002, 01:17 PM
  5. Colour theory... (weird title)
    By Magos in forum C++ Programming
    Replies: 5
    Last Post: 11-25-2001, 03:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21