0

can you help me how to display an equivalent color once an input letter matches its first character for example b is for blue, r for red and so on.
letter colors
b or B blue
r or R red
g or G Green
y or Y yellow
other Letter -unknown color

5
Contributors
4
Replies
27
Views
4 Years
Discussion Span
Last Post by cambalinho
0

Displaying color is something which is system-dependent; there are no standard C++ libraries which have any concept of colors. What operating system (e.g., Windows, Linux, MacOS) is this running under? Which compiler are you using? Are you using the system routines (if any) or a platform-independent third-party library such as Qt or GTK+? Is this to be in a console application, or a windowed GUI application? Just what do you mean by 'display an equivalent color': do you want to show a box or swatch filled with the color, or do you want the text changed to that color, or something else? Is this a simple example program, or part of a larger project?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.