You are not logged in.
Hi all,
I'm looking for a solution for my problem. I really hope someone can help me out / point me in the right direcion here.
The problem: an application (coded in C++) has hardcoded which colors it can use. Everything drawn by the code is green (#00FF00). The developers choose to include all combinations of FF and 00. So, red, yellow, magenta, green, etc. These one can choose from.
However, I need to have a customized color in this application (0, 255 , 191).
So the problem to solve is: I need a hex assigned value (#00FF00, green) to represent another color, but without changing this hexcode! I want this hexcode (#00FF00) to represent the color: 0, 255, 191)
So, before the app starts reading all variables and declares all constants, a want to redesign the colorpalette it uses, so whenever the hexcode #00FF00 is called, it returns the RGB value of 0, 255, 191
Any clues?
Fan
Offline
Color pallettes were used many decades ago in some screen modes.
I don't think you can do this substitution likely now, but I may be wrong.
igloo myrtilles fourmis
Offline
hi FanOfBMS432
In many ( perhaps all ??) computer languages green is represented this way.
So I suspect it is a standard to make it easy to generate colours correctly on the screen when the code is sent to the graphics sub-routines.
So I would suggest you find a way to program the change in a variable you want so the correct colour is made rather than changing the palette.
Some sort of Look Up Table perhaps?
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline