VE Lua Documentation

Press F to search!

getContrastColor

Definition


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

--== color things ==--
-- color conversion helpers
function getContrastColor(i, a)
  return jetColor((i % 17) / 16, a)
end

Callers

@/lua/vehicle/controller/couplings/kingpin.lua
local function debugDrawMethod(focusPos)
  obj.debugDrawProxy:drawNodeSphere(kingpinNodeCid, 0.15, getContrastColor(stringHash(kingpinKey), 150))
end
@/lua/vehicle/controller/couplings/fifthwheel.lua
local function debugDrawMethod(focusPos)
  obj.debugDrawProxy:drawNodeSphere(fifthwheelNodeCid, 0.15, getContrastColor(stringHash(fifthwheelKey), 150))
end
@/lua/vehicle/bdebugImpl.lua
            if not groupsData[g] then
              groupsData[g] = {0, vec3(), getContrastColor(j, 255 * alpha)}
              j = j + 1
            if not groupsData[g] then
              groupsData[g] = {0, vec3(), getContrastColor(j, 255 * alpha)}
              j = j + 1
@/lua/vehicle/ai.lua
      if plan[1] then
        local red = color(255,0,0,200) -- getContrastColor(objectId)
        local black = color(0, 0, 0, 255)
      if plan[1] then
        local col = getContrastColor(objectId)
        local prevPoint = plan[1].pos
@/ui/lib/ext/angular-material/angular-material.js
        value: rgbValue,
        contrast: getContrastColor()
      };
      };
      function getContrastColor() {
        if (defaultContrast === 'light') {
@/lua/vehicle/beamstate.lua
    if not coupler.couplerLock and not coupler.couplerWeld and ((coupler.couplerTag and externalCouplerVisibilityTags[coupler.couplerTag]) or (coupler.tag and externalCouplerVisibilityTags[coupler.tag])) then
      obj.debugDrawProxy:drawNodeSphere(coupler.cid, 0.15, getContrastColor(stringHash(coupler.couplerTag or coupler.tag), 150))
    end