[updated] I've tweaked my code, to better preserve variations of hue.
Given FD's reluctance to implement the much-requested custom HUD colors, I'm assuming that the UI elements are drawn in orange in various bitmaps which are combined via overlays to produce what we see in game. That is, the HUD colors are "baked" into the UI bitmaps, something like this:
Because the colors are part of the artwork, the orange stuff can't be changed without changing the hue of the other elements. Assuming that's true, you just need to filter out the orange pixels and modify only those.
You can add a UI color option (dropdown list of color names) to the graphics settings, which will apply the custom UI colors to the assets when they are first loaded. The UI colors would not change until the assets are reloaded. This would mean that the changes are localized and shouldn't affect other elements in the game, like the faces in the mission board or hair color in Holo-Me.
If there are some UI images which shouldn't be filtered, you could add an exclusion list or store them in a separate "don't touch" folder.
Here's a sample implementation.
This implementation can provide UI in any hue and even provides White, which is Saturation==0. If there is a problem with the orange matching colors it should not, you can increase the filter specificity by adding saturation and/or lightness limits to the filter.
Here's a possible list of UI colors, which can easily be exended:
Red: Hue = 0; Saturation=255
Orange: 30; 255
Yellow: 60; 255
Green: 120; 255
Aqua: 180; 255
Blue: 240; 255
Magenta: 300; 255
White: Hue=0; Saturation=0
There are other color possibilities, such as Pale Blue: 240; 100
See https://en.wikipedia.org/wiki/HSL_and_HSV for more details.
*Update* I just realized that I didn't mention that the GetRGBfromHLS() function needs to handle hues less than 0 and greater than 360, by wrapping them back into range the range 0..360.
Given FD's reluctance to implement the much-requested custom HUD colors, I'm assuming that the UI elements are drawn in orange in various bitmaps which are combined via overlays to produce what we see in game. That is, the HUD colors are "baked" into the UI bitmaps, something like this:

Because the colors are part of the artwork, the orange stuff can't be changed without changing the hue of the other elements. Assuming that's true, you just need to filter out the orange pixels and modify only those.
You can add a UI color option (dropdown list of color names) to the graphics settings, which will apply the custom UI colors to the assets when they are first loaded. The UI colors would not change until the assets are reloaded. This would mean that the changes are localized and shouldn't affect other elements in the game, like the faces in the mission board or hair color in Holo-Me.
If there are some UI images which shouldn't be filtered, you could add an exclusion list or store them in a separate "don't touch" folder.
Here's a sample implementation.
Code:
bool PostLoadUiBitmapColorAdjustment( CBitmap* bmp, int newHue, int newSaturation )
{
int uiOrangeHue = 30; // might change, depends on HLS implementation
int epsolon = 5; // small delta, to handle slight variations of orange - tweak as needed
bool didAnyPixelChange = false;
// scan each pixel
for ( int x=0; x < bmp->width(); x++)
{
for ( int y=0; y < bmp->height(); y++)
{
RGB rgbPixel = GetPixel( bmp, x, y);
int hue, lightness, saturation;
GetHLSfromRGB( rgbPixel, &hue, &lightness, &saturation);
if ( (uiOrangeHue-epsolon <= hue) && (hue <= uiOrangeHue+epsolon) )
{
// I noticed there are subtle shades of orange, offset newHue to preserve slight hue variations
int pixelHue = newHew + hue-uiOrange;
didAnyPixelChange=true;
rbgPixel = GetRGBfromHLS( pixelHue, lightness, newSaturation);
PutPixel( bmp, x, y, rgbPixel);
}
}
}
return didAnyPixelChange;
}
This implementation can provide UI in any hue and even provides White, which is Saturation==0. If there is a problem with the orange matching colors it should not, you can increase the filter specificity by adding saturation and/or lightness limits to the filter.
Here's a possible list of UI colors, which can easily be exended:
Red: Hue = 0; Saturation=255
Orange: 30; 255
Yellow: 60; 255
Green: 120; 255
Aqua: 180; 255
Blue: 240; 255
Magenta: 300; 255
White: Hue=0; Saturation=0
There are other color possibilities, such as Pale Blue: 240; 100
See https://en.wikipedia.org/wiki/HSL_and_HSV for more details.
*Update* I just realized that I didn't mention that the GetRGBfromHLS() function needs to handle hues less than 0 and greater than 360, by wrapping them back into range the range 0..360.
Last edited: