MLightCAD
    Preparing search index...
    • Normalises a raw COLORTHEME system-variable value to a boolean light UI theme flag.

      AutoCAD stores COLORTHEME as a number (0 = dark, 1 = light), but the value may arrive from the database or event payloads as a number, boolean, or string. This helper accepts all common representations so callers do not need to duplicate parsing logic.

      Parameters

      • value: unknown

        Raw sysvar value from AcDbSysVarManager or a sysVarChanged event. Recognised forms:

        • number — light when equal to 1
        • boolean — returned as-is
        • string — light when 'light', '1', or 'true' (case-insensitive)

      Returns boolean

      true for a light colour theme; false for dark or any other value.

      isLightColorTheme(1)        // true
      isLightColorTheme(0) // false
      isLightColorTheme('light') // true
      isLightColorTheme('dark') // false