Colorhelper: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
Pinecone (talk | contribs)
New page: ColorHelper is a .h header file for any C or C++ project (WiiBrew or otherwise) which allows easy reference to 19 different colours in your project. --How to Use-- Fortunately, it couldn...
 
Pinecone (talk | contribs)
No edit summary
Line 1: Line 1:
ColorHelper is a .h header file for any C or C++ project (WiiBrew or otherwise) which allows easy reference to 19 different colours in your project.
ColorHelper is a .h header file for any C or C++ project (WiiBrew or otherwise) which allows easy reference to 19 different colours in your project, by [[User:Pinecone|Pinecone]].


--How to Use--
==How to Use==


Fortunately, it couldn't be simpler:
Fortunately, it couldn't be simpler:
Line 12: Line 12:
  COLOR_<colorname>
  COLOR_<colorname>


--Table of Colours--
==Table of Colours==


<table width="70%" border="2" cellspacing="0" cellpadding="5"  
<table width="70%" border="2" cellspacing="0" cellpadding="5"  
Line 113: Line 113:
</table>
</table>


--Note--
==Note==


This was very easy to make and really anyone with half a brain could have done it. I just found it really useful in my projects to have a colour referencer handy.
This was very easy to make and really anyone with half a brain could have done it. I just found it really useful in my projects to have a colour referencer handy.


Please appreciate the spelling of the word COLOR: I am English so I would rather have it spelt like this: COLOUR. For the sake of convention (and in light of the fact that there are a good deal of Americans here), all colours are spelt using the American COLOR spelling. In all non-coding contexts, however, you will notice I spell it with the English spelling Colour.
Please appreciate the spelling of the word COLOR: I am English so I would rather have it spelt like this: COLOUR. For the sake of convention (and in light of the fact that there are a good deal of Americans here), all colours are spelt using the American COLOR spelling. In all non-coding contexts, however, you will notice I spell it with the English spelling Colour.
N.B: My apologies if the graphics library you are using uses colours encoded differently. I must stress that this was written for my own use, and I will not be taking suggestions or requests, for doing so is sheer laziness. If you are able to use it, you are able to change it.

Revision as of 00:03, 20 November 2008

ColorHelper is a .h header file for any C or C++ project (WiiBrew or otherwise) which allows easy reference to 19 different colours in your project, by Pinecone.

How to Use

Fortunately, it couldn't be simpler:

- 1: Download color.h - 2: Put color.h in your source directory - 3: add the following line to the top of any page from which you may want to reference colours:

#import "color.h"

- 4: refer to your colour of choice using the following construction:

COLOR_<colorname>

Table of Colours

Color Name HEX Code Color
black #000000  
white #ffffff  
red #ff0000  
blue #0000ff  
green #008000  
yellow #ffff00  
orange #ffa500  
violet #ee82ee  
purple #800080  
pink #ffc0cb  
silver #c0c0c0  
gold #ffd700  
gray #808080  
aqua #00ffff  
skyblue #87ceeb  
lightblue #add8e6  
fuchsia #ff00ff  
khaki #f0e68c  

Note

This was very easy to make and really anyone with half a brain could have done it. I just found it really useful in my projects to have a colour referencer handy.

Please appreciate the spelling of the word COLOR: I am English so I would rather have it spelt like this: COLOUR. For the sake of convention (and in light of the fact that there are a good deal of Americans here), all colours are spelt using the American COLOR spelling. In all non-coding contexts, however, you will notice I spell it with the English spelling Colour.

N.B: My apologies if the graphics library you are using uses colours encoded differently. I must stress that this was written for my own use, and I will not be taking suggestions or requests, for doing so is sheer laziness. If you are able to use it, you are able to change it.