VE Lua Documentation

Press F to search!

getContrastColorStringRGB

Definition


-- @/lua/vehicle/ve_utils.lua:227

function getContrastColorStringRGB(i)
  local c1, c2, c3 = colorGetRGBA(jetColor((i % 17) / 16))
  return stringformat("#%02x%02x%02x", c1, c2, c3)
end

Callers

@/lua/vehicle/extensions/straightLine.lua
  --            gui.send('genericGraphAdvanced', {
  --                    steering = { title = "Steering", color = getContrastColorStringRGB(1), unit = "ms", value = steering},
  --                    P = { title = "P", color = getContrastColorStringRGB(2), unit = "ms", value = angleError * proportionalCoef},
  --                    steering = { title = "Steering", color = getContrastColorStringRGB(1), unit = "ms", value = steering},
  --                    P = { title = "P", color = getContrastColorStringRGB(2), unit = "ms", value = angleError * proportionalCoef},
  --                    I = { title = "I", color = getContrastColorStringRGB(3), unit = "ms", value = steeringIntegral * integralCoef},
  --                    P = { title = "P", color = getContrastColorStringRGB(2), unit = "ms", value = angleError * proportionalCoef},
  --                    I = { title = "I", color = getContrastColorStringRGB(3), unit = "ms", value = steeringIntegral * integralCoef},
  --                })
@/lua/vehicle/extensions/perfectLaunch.lua
  --            gui.send('genericGraphAdvanced', {
  --                    throttle = { title = "Throttle", color = getContrastColorStringRGB(1), unit = "", value = throttle},
  --                    P = { title = "P", color = getContrastColorStringRGB(2), unit = "", value = slipError},
  --                    throttle = { title = "Throttle", color = getContrastColorStringRGB(1), unit = "", value = throttle},
  --                    P = { title = "P", color = getContrastColorStringRGB(2), unit = "", value = slipError},
  --                    I = { title = "I", color = getContrastColorStringRGB(3), unit = "", value = throttleIntegral},
  --                    P = { title = "P", color = getContrastColorStringRGB(2), unit = "", value = slipError},
  --                    I = { title = "I", color = getContrastColorStringRGB(3), unit = "", value = throttleIntegral},
  --                    spinning = { title = "Spinning", color = getContrastColorStringRGB(4), unit = "", value = spinning},
  --                    I = { title = "I", color = getContrastColorStringRGB(3), unit = "", value = throttleIntegral},
  --                    spinning = { title = "Spinning", color = getContrastColorStringRGB(4), unit = "", value = spinning},
  --                })
@/lua/vehicle/wheels.lua
  --    gui.send('genericGraphAdvanced', {
  --        virtualSpeed = { title = "Virtual Speed", color = getContrastColorStringRGB(7), unit = "km/h", value = virtualAirspeed * 3.6},
  --        realSpeed = { title = "Real Speed", color = getContrastColorStringRGB(1), unit = "km/h", value = obj:getGroundSpeed() * 3.6},
  --        virtualSpeed = { title = "Virtual Speed", color = getContrastColorStringRGB(7), unit = "km/h", value = virtualAirspeed * 3.6},
  --        realSpeed = { title = "Real Speed", color = getContrastColorStringRGB(1), unit = "km/h", value = obj:getGroundSpeed() * 3.6},
  --        wheelSpeed = { title = "Wheel Speed", color = getContrastColorStringRGB(8), unit = "km/h", value = wheelspeed * 3.6},
  --        realSpeed = { title = "Real Speed", color = getContrastColorStringRGB(1), unit = "km/h", value = obj:getGroundSpeed() * 3.6},
  --        wheelSpeed = { title = "Wheel Speed", color = getContrastColorStringRGB(8), unit = "km/h", value = wheelspeed * 3.6},
  --        yaw = { title = "Yaw Rate", color = getContrastColorStringRGB(5), unit = "km/h", value = abs(obj:getYawAngularVelocity()) * 10},
  --        wheelSpeed = { title = "Wheel Speed", color = getContrastColorStringRGB(8), unit = "km/h", value = wheelspeed * 3.6},
  --        yaw = { title = "Yaw Rate", color = getContrastColorStringRGB(5), unit = "km/h", value = abs(obj:getYawAngularVelocity()) * 10},
  --        mapIndex = { title = "Map Index", color = getContrastColorStringRGB(11), unit = "", value = (mapId-1) * 10},
  --        yaw = { title = "Yaw Rate", color = getContrastColorStringRGB(5), unit = "km/h", value = abs(obj:getYawAngularVelocity()) * 10},
  --        mapIndex = { title = "Map Index", color = getContrastColorStringRGB(11), unit = "", value = (mapId-1) * 10},
  --      })