Hi FiveM-humans, it happened again and for complex reasons I threw the hud indexes and the associated rgba codes into a table.
Hopefully this is as useful to you as it is to me :slight_smile:

IMPORTANT

I am publishing this because no one should ever have to do this again!

List of HUD_Indexs

Code (the function to get it is under the colour table)

Config = {}
Config.HudIndexToRgb = {
	["0"] = {255, 255, 255, 255},
  	["1"] = {240, 240, 240, 255},
  	["2"] = {0, 0, 0, 255},
  	["3"] = {155, 155, 155, 255},
  	["4"] = {205, 205, 205, 255},
  	["5"] = {77, 77, 77, 255},
  	["6"] = {224, 50, 50, 255},
  	["7"] = {240, 153, 153, 255},
  	["8"] = {112, 25, 25, 255},
  	["9"] = {93, 182, 229, 255},
  	["10"] = {174, 219, 242, 255},
  	["11"] = {47, 92, 115, 255},
  	["12"] = {240, 200, 80, 255},
  	["13"] = {254, 235, 169, 255},
  	["14"] = {126, 107, 41, 255},
  	["15"] = {255, 133, 85, 255},
  	["16"] = {255, 194, 170, 255},
  	["17"] = {127, 66, 42, 255},
  	["18"] = {114, 204, 114, 255},
  	["19"] = {185, 230, 185, 255},
  	["20"] = {57, 102, 57, 255},
  	["21"] = {132, 102, 226, 255},
  	["22"] = {192, 179, 239, 255},
  	["23"] = {67, 57, 111, 255},
  	["24"] = {203, 54, 148, 255},
  	["25"] = {53, 154, 71, 255},
  	["26"] = {93, 182, 229, 255},
  	["27"] = {235, 36, 39, 255},
  	["28"] = {194, 80, 80, 255},
  	["29"] = {156, 110, 175, 255},
  	["30"] = {255, 123, 196, 255},
  	["31"] = {247, 159, 123, 255},
  	["32"] = {178, 144, 132, 255},
  	["33"] = {141, 206, 167, 255},
  	["34"] = {113, 169, 175, 255},
  	["35"] = {211, 209, 231, 255},
  	["36"] = {144, 127, 153, 255},
  	["37"] = {106, 196, 191, 255},
  	["38"] = {214, 196, 153, 255},
  	["39"] = {234, 142, 80, 255},
  	["40"] = {152, 203, 234, 255},
  	["41"] = {178, 98, 135, 255},
  	["42"] = {144, 142, 122, 255},
  	["43"] = {166, 117, 94, 255},
  	["44"] = {175, 168, 168, 255},
  	["45"] = {232, 142, 155, 255},
  	["46"] = {187, 214, 91, 255},
  	["47"] = {12, 123, 86, 255},
  	["48"] = {123, 196, 255, 255},
  	["49"] = {171, 60, 230, 255},
  	["50"] = {206, 169, 13, 255},
  	["51"] = {71, 99, 173, 255},
  	["52"] = {42, 166, 185, 255},
  	["53"] = {186, 157, 125, 255},
  	["54"] = {201, 225, 255, 255},
  	["55"] = {240, 240, 150, 255},
  	["56"] = {237, 140, 161, 255},
  	["57"] = {249, 138, 138, 255},
  	["58"] = {252, 239, 166, 255},
  	["59"] = {240, 240, 240, 255},
  	["60"] = {159, 201, 166, 255},
  	["61"] = {140, 140, 140, 255},
  	["62"] = {140, 140, 140, 255},
  	["63"] = {40, 40, 40, 255},
  	["64"] = {240, 160, 0, 255},
  	["65"] = {240, 160, 0, 255},
  	["66"] = {240, 160, 0, 255},
  	["67"] = {140, 140, 140, 255},
  	["68"] = {60, 60, 60, 255},
  	["69"] = {30, 30, 30, 255},
  	["70"] = {140, 140, 140, 255},
  	["71"] = {75, 75, 75, 255},
  	["72"] = {50, 50, 50, 255},
  	["73"] = {95, 95, 95, 255},
  	["74"] = {100, 100, 100, 255},
  	["75"] = {93, 39, 39, 255},
  	["76"] = {77, 55, 89, 255},
  	["77"] = {124, 62, 99, 255},
  	["78"] = {120, 80, 80, 255},
  	["79"] = {87, 72, 66, 255},
  	["80"] = {74, 103, 83, 255},
  	["81"] = {60, 85, 88, 255},
  	["82"] = {105, 105, 64, 255},
  	["83"] = {72, 63, 76, 255},
  	["84"] = {53, 98, 95, 255},
  	["85"] = {107, 98, 76, 255},
  	["86"] = {117, 71, 40, 255},
  	["87"] = {76, 101, 117, 255},
  	["88"] = {65, 35, 47, 255},
  	["89"] = {72, 71, 61, 255},
  	["90"] = {85, 58, 47, 255},
  	["91"] = {87, 84, 84, 255},
  	["92"] = {116, 71, 77, 255},
  	["93"] = {93, 107, 45, 255},
  	["94"] = {6, 61, 43, 255},
  	["95"] = {61, 98, 127, 255},
  	["96"] = {85, 30, 115, 255},
  	["97"] = {103, 84, 6, 255},
  	["98"] = {35, 49, 86, 255},
  	["99"] = {21, 83, 92, 255},
  	["100"] = {93, 98, 62, 255},
  	["101"] = {100, 112, 127, 255},
  	["102"] = {120, 120, 75, 255},
  	["103"] = {152, 76, 93, 255},
  	["104"] = {124, 69, 69, 255},
  	["105"] = {10, 43, 50, 255},
  	["106"] = {95, 95, 10, 255},
  	["107"] = {180, 130, 97, 255},
  	["108"] = {150, 153, 161, 255},
  	["109"] = {214, 181, 99, 255},
  	["110"] = {166, 221, 190, 255},
  	["111"] = {29, 100, 153, 255},
  	["112"] = {214, 116, 15, 255},
  	["113"] = {135, 125, 142, 255},
  	["114"] = {229, 119, 185, 255},
  	["115"] = {252, 239, 166, 255},
  	["116"] = {45, 110, 185, 255},
  	["117"] = {0, 0, 0, 186},
  	["118"] = {93, 182, 229, 255},
  	["119"] = {194, 80, 80, 255},
  	["120"] = {240, 200, 80, 255},
  	["121"] = {114, 204, 114, 255},
  	["122"] = {114, 204, 114, 255},
  	["123"] = {22, 55, 92, 255},
  	["124"] = {154, 154, 154, 255},
  	["125"] = {194, 80, 80, 255},
  	["126"] = {252, 115, 201, 255},
  	["127"] = {252, 177, 49, 255},
  	["128"] = {0, 0, 0, 255},
  	["129"] = {109, 247, 204, 255},
  	["130"] = {241, 101, 34, 255},
  	["131"] = {214, 189, 97, 255},
  	["132"] = {112, 25, 25, 255},
  	["133"] = {47, 92, 115, 255},
  	["134"] = {93, 182, 229, 255},
  	["135"] = {234, 153, 28, 255},
  	["136"] = {11, 55, 123, 255},
  	["137"] = {146, 200, 62, 255},
  	["138"] = {234, 153, 28, 255},
  	["139"] = {66, 89, 148, 255},
  	["140"] = {0, 0, 0, 186},
  	["141"] = {114, 204, 114, 255},
  	["142"] = {164, 76, 242, 255},
  	["143"] = {101, 180, 212, 255},
  	["144"] = {171, 237, 171, 255},
  	["145"] = {255, 163, 87, 255},
  	["146"] = {240, 240, 240, 255},
  	["147"] = {235, 239, 30, 255},
  	["148"] = {255, 149, 14, 255},
  	["149"] = {246, 60, 161, 255},
  	["150"] = {210, 166, 249, 255},
  	["151"] = {82, 38, 121, 255},
  	["152"] = {0, 0, 0, 77},
  	["153"] = {72, 103, 116, 255},
  	["154"] = {85, 118, 85, 255},
  	["155"] = {127, 81, 43, 255},
  	["156"] = {240, 200, 80, 255},
  	["157"] = {0, 0, 0, 215},
  	["158"] = {100, 100, 100, 127},
  	["159"] = {45, 110, 185, 255},
  	["160"] = {240, 240, 240, 191},
  	["161"] = {0, 0, 0, 186},
  	["162"] = {224, 50, 50, 255},
  	["163"] = {0, 0, 0, 215},
  	["164"] = {0, 71, 133, 255},
  	["165"] = {0, 0, 0, 255},
  	["166"] = {33, 118, 37, 255},
  	["167"] = {37, 102, 40, 255},
  	["168"] = {234, 153, 28, 255},
  	["169"] = {225, 140, 8, 255},
  	["170"] = {20, 40, 0, 255},
  	["171"] = {48, 255, 255, 255},
  	["172"] = {48, 255, 0, 255},
  	["173"] = {176, 80, 0, 255},
  	["174"] = {127, 0, 0, 255},
  	["175"] = {53, 166, 224, 255},
  	["176"] = {162, 79, 157, 255},
  	["177"] = {104, 192, 141, 255},
  	["178"] = {29, 100, 153, 255},
  	["179"] = {234, 153, 28, 255},
  	["180"] = {240, 160, 1, 255},
  	["181"] = {59, 34, 57, 255},
  	["182"] = {41, 68, 53, 255},
  	["183"] = {82, 58, 10, 255},
  	["184"] = {37, 102, 40, 186},
  	["185"] = {240, 200, 80, 255},
  	["186"] = {80, 70, 34, 255},
  	["187"] = {255, 133, 85, 255},
  	["188"] = {255, 194, 170, 255},
  	["189"] = {255, 133, 85, 255},
  	["190"] = {240, 200, 80, 255},
  	["191"] = {126, 107, 41, 255},
  	["192"] = {247, 159, 123, 255},
  	["193"] = {226, 134, 187, 255},
  	["194"] = {239, 238, 151, 255},
  	["195"] = {113, 169, 175, 255},
  	["196"] = {160, 140, 193, 255},
  	["197"] = {141, 206, 167, 255},
  	["198"] = {181, 214, 234, 255},
  	["199"] = {178, 144, 132, 255},
  	["200"] = {0, 132, 114, 255},
  	["201"] = {216, 85, 117, 255},
  	["202"] = {30, 100, 152, 255},
  	["203"] = {43, 181, 117, 255},
  	["204"] = {233, 141, 79, 255},
  	["205"] = {137, 210, 215, 255},
  	["206"] = {134, 125, 141, 255},
  	["207"] = {109, 34, 33, 255},
  	["208"] = {255, 0, 0, 255},
  	["209"] = {255, 255, 0, 255},
  	["210"] = {0, 255, 0, 255},
  	["211"] = {0, 255, 255, 255},
  	["212"] = {0, 0, 255, 255},
  	["213"] = {255, 0, 255, 255},
  	["214"] = {38, 136, 234, 255},
  	["215"] = {224, 50, 50, 255},
  	["216"] = {154, 178, 54, 255},
  	["217"] = {93, 107, 45, 255},
  	["218"] = {206, 169, 13, 255},
  	["219"] = {103, 84, 6, 255},
  	["220"] = {0, 151, 151, 255},
  	["221"] = {5, 119, 113, 255},
  	["222"] = {151, 0, 0, 255},
  	["223"] = {0, 40, 40, 255},
  	["224"] = {255, 255, 255, 255},
  	["225"] = {255, 255, 255, 255},
  	["226"] = {255, 255, 255, 255},
  	["227"] = {255, 255, 255, 255},
  	["228"] = {255, 255, 255, 255},
  	["229"] = {255, 255, 255, 255},
  	["230"] = {255, 255, 255, 255},
  	["231"] = {255, 255, 255, 255},
  	["232"] = {255, 255, 255, 255},
  	["233"] = {255, 255, 255, 255},
}

function GetRgbFromHudIndex(id)
	for k, v in pairs(Config.HudIndexToRgb) do
		if tonumber(k) == id then
			return v
		end	
	end
end

function GetHudIndexFromRgb(rgb)
	for k, v in pairs(Config.HudIndexToRgb) do
		if v[1] == rgb[1] and v[2] == rgb[2] and v[3] == rgb[3] then
			return tonumber(k)
		end
	end
end

The usage is the same as in my blip to rgb code snippet

local rgb = GetRgbFromHudIndex(9)
-- blue --
rgb[1] = 93 -- red 
rgb[2] = 182 -- green
rgb[3] = 229 -- blue
rgb[4] = 255 -- alpha



Looking for paid scripts? Click here