TGC Codebase Backup



10 Color Definitions by Tim Ballisto

15th Mar 2004 20:15
Summary

Defines the rgb() values of ten basic colors so you don't have to.



Description

This snippet defines the rgb values of three shades of each of the ten basic colors.

It defines these colors:red, green, blue, black, white, yellow, orange, brown, violet, and gray.

In these shades: color, bright_color, dark_color.

If you look at the code, you may understand it better.

INSTRUCTIONS!!!
Put GOSUB DEFINE_COLORS at the beginning of your program, or at least before you color anything.

Put the listed code anywhere in the program, but it must be AFTER your gosub command.

Instead of writing things like *color object 1,rgb(127,127,127)* you can write *color object 1,gray*.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `##########################################################################
`MAKE SURE YOU HAVE GOSUB DEFINE_COLORS AT THE BEGINNING OF YOUR PROGRAM!!!
`##########################################################################

`start
define_colors:

`black
black=rgb(25,25,25)
bright_black=rgb(50,50,50)
dark_black=rgb(0,0,0)

`white
white=rgb(225,225,225)
bright_white=rgb(255,255,255)
dark_white=rgb(200,200,200)

`red
red=rgb(200,0,0)
bright_red=rgb(255,0,0)
dark_red=rgb(100,0,0)

`green
green=rgb(0,200,0)
bright_green=rgb(0,255,0)
dark_green=rgb(0,100,0)

`blue
blue=rgb(0,0,200)
bright_blue=rgb(0,0,255)
dark_blue=rgb(0,0,100)

`yellow
yellow=rgb(225,225,0)
bright_yellow=rgb(255,255,0)
dark_yellow=rgb(200,200,0)

`violet
violet=rgb(100,0,100)
bright_violet=rgb(150,0,150)
dark_violet=rgb(75,0,75)

`orange
orange=rgb(200,100,10)
bright_orange=rgb(255,155,65)
dark_orange=rgb(175,75,10)

`brown
brown=rgb(150,100,0)
bright_brown=rgb(175,125,35)
dark_brown=rgb(125,75,0)

`gray
gray=rgb(127,127,127)
bright_gray=rgb(150,150,150)
dark_gray=rgb(100,100,100)

`return
return