{"record":{"id":"5e1b0d4043b6850c","repo":"heygen-com/hyperframes","slug":"lut-3d-input-range-max-must-exceed-min","errorCode":null,"errorMessage":"LUT_3D_INPUT_RANGE max must exceed min","messagePattern":"LUT_3D_INPUT_RANGE max must exceed min","errorType":"validation","errorClass":"CubeLutParseError","httpStatus":null,"severity":"error","filePath":"packages/core/src/colorLuts.ts","lineNumber":132,"sourceCode":"      title = parseTitle(line);\n      continue;\n    }\n    if (keyword === \"DOMAIN_MIN\") {\n      domainMin = parseVec3(rest, keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"DOMAIN_MAX\") {\n      domainMax = parseVec3(rest, keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"LUT_3D_INPUT_RANGE\") {\n      if (rest.length !== 2) {\n        throw new CubeLutParseError(`${keyword} expects two numbers`, lineNumber);\n      }\n      const min = parseFiniteNumber(rest[0]!, lineNumber);\n      const max = parseFiniteNumber(rest[1]!, lineNumber);\n      if (max <= min) {\n        throw new CubeLutParseError(\"LUT_3D_INPUT_RANGE max must exceed min\", lineNumber);\n      }\n      domainMin = [min, min, min];\n      domainMax = [max, max, max];\n      continue;\n    }\n    if (keyword === \"LUT_1D_SIZE\") {\n      lut1dSize = parseSize(rest[0], keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"LUT_3D_SIZE\") {\n      lut3dSize = parseSize(rest[0], keyword, lineNumber);\n      if (lut3dSize > maxSize) {\n        throw new CubeLutParseError(`LUT_3D_SIZE ${lut3dSize} exceeds max ${maxSize}`, lineNumber);\n      }\n      continue;\n    }\n\n    if (!isNumericDataLine(keyword)) {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/core/src/colorLuts.ts#L114-L150","documentation":"After confirming two tokens, parseCubeLut requires the LUT_3D_INPUT_RANGE max to strictly exceed min (line 131-132). An equal or inverted pair would describe a zero-length or negative domain, which cannot be sampled.","triggerScenarios":"'LUT_3D_INPUT_RANGE 0.5 0.5' (equal) or 'LUT_3D_INPUT_RANGE 1 0' (inverted).","commonSituations":"Copy-paste producing two identical values; swapping min/max when hand-editing; default placeholders left at the same value.","solutions":["Set max strictly greater than min, e.g. 'LUT_3D_INPUT_RANGE 0 1'.","If your LUT operates in a narrower band, choose a min/max pair with min < max (e.g. 0.1 0.9).","Remove the line entirely to fall back to the default [0,0,0]..[1,1,1] domain."],"exampleFix":"// before\nLUT_3D_INPUT_RANGE 0.5 0.5\n\n// after\nLUT_3D_INPUT_RANGE 0 1","handlingStrategy":"try-catch","validationCode":"function assertInputRangeOrdered(line: string): void {\n  const [, a, b] = line.trim().split(/\\s+/).map(Number);\n  if (!(a < b)) throw new Error(`LUT_3D_INPUT_RANGE max must exceed min, got ${a} ${b}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  parseCubeLut(fileText);\n} catch (err) {\n  if (err instanceof CubeLutParseError && /max must exceed min/.test(err.message)) {\n    // suggest falling back to default domain by removing the line\n  } else throw err;\n}","preventionTips":["Write min before max in LUT_3D_INPUT_RANGE.","Remove the line to accept the default [0,0,0]..[1,1,1] domain.","Re-export from the source tool."],"tags":["lut","cube","input-range","parsing"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}