See vgui_color_text.h for a description of this file. More...
#include "vgui_color_text.h"
#include <vcl_cstdio.h>
#include <vcl_iostream.h>
#include <vgui/vgui_macro.h>
Go to the source code of this file.
Defines | |
#define | NB_COLORS (sizeof(colors)/sizeof(colors[0])) |
Functions | |
vcl_string | text_to_color (const vcl_string &txt) |
Convert a string naming a colour to a string of the RGB values. | |
float | red_value (const vcl_string &txt) |
Given a string naming a colour, return its red value. | |
float | green_value (const vcl_string &txt) |
Given a string naming a colour, return its green value. | |
float | blue_value (const vcl_string &txt) |
Given a string naming a colour, return its blue value. | |
Variables | |
vcl_string | colors [][2] |
See vgui_color_text.h for a description of this file.
Modifications 25-FEB-2000 K.Y.McGaul - Initial version.
Definition in file vgui_color_text.cxx.
Definition at line 46 of file vgui_color_text.cxx.
float blue_value | ( | const vcl_string & | txt | ) |
Given a string naming a colour, return its blue value.
Definition at line 92 of file vgui_color_text.cxx.
float green_value | ( | const vcl_string & | txt | ) |
Given a string naming a colour, return its green value.
Definition at line 84 of file vgui_color_text.cxx.
float red_value | ( | const vcl_string & | txt | ) |
Given a string naming a colour, return its red value.
Definition at line 76 of file vgui_color_text.cxx.
vcl_string text_to_color | ( | const vcl_string & | txt | ) |
Convert a string naming a colour to a string of the RGB values.
Definition at line 49 of file vgui_color_text.cxx.
vcl_string colors[][2] |
{ { "white", "1.000 1.000 1.000" }, { "black", "0.000 0.000 0.000" }, { "blue", "0.000 0.000 1.000" }, { "red", "1.000 0.000 0.000" }, { "green", "0.000 1.000 0.000" }, { "yellow", "1.000 1.000 0.000" }, { "grey", "0.745 0.745 0.745" }, { "orange", "1.000 0.647 0.000" }, { "pink", "1.000 0.752 0.796" }, { "purple", "0.627 0.125 0.941" }, { "cyan", "0.000 1.000 1.000" }, { "brown", "0.647 0.165 0.165" }, { "light blue", "0.678 0.847 0.902" }, { "sky blue", "0.529 0.808 0.922" }, { "dark blue", "0.000 0.000 0.545" }, { "light pink", "1.000 0.714 0.757" }, { "deep pink", "1.000 0.078 0.576" }, { "orange red", "1.000 0.270 0.000" }, { "light green", "0.565 0.933 0.565" }, { "dark green", "0.000 0.392 0.000" }, { "gold", "1.000 0.843 0.000" }, { "tan", "0.824 0.706 0.549" }, { "dim grey", "0.412 0.412 0.412" }, { "dark slate grey","0.184 0.310 0.310" } }
Definition at line 20 of file vgui_color_text.cxx.