{"record":{"id":"a08ed700ef7dc9e4","repo":"rouge-ruby/rouge","slug":"invalid-theme-theme-inspect-a08ed7","errorCode":null,"errorMessage":"invalid theme: #{theme.inspect}","messagePattern":"invalid theme: #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/rouge/formatters/terminal256.rb","lineNumber":24,"sourceCode":"    # A formatter for 256-color terminals\n    class Terminal256 < Formatter\n      tag 'terminal256'\n\n      # max distance between two colors, #000000 to #ffffff\n      MAX_DISTANCE = 257 * 257 * 3\n\n      # @private\n      attr_reader :theme\n\n      # @param [Hash,Rouge::Theme] theme\n      #   the theme to render with.\n      def initialize(theme = Themes::ThankfulEyes.new)\n        if theme.is_a?(Rouge::Theme)\n          @theme = theme\n        elsif theme.is_a?(Hash)\n          @theme = theme[:theme] || Themes::ThankfulEyes.new\n        else\n          raise ArgumentError, \"invalid theme: #{theme.inspect}\"\n        end\n      end\n\n      def stream(tokens, &b)\n        tokens.each do |tok, val|\n          escape_sequence(tok).stream_value(val, &b)\n        end\n      end\n\n      class EscapeSequence\n        attr_reader :style\n        def initialize(style)\n          @style = style\n        end\n\n        def self.xterm_colors\n          @xterm_colors ||= [].tap do |out|\n            # colors 0..15: 16 basic colors","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/rouge-ruby/rouge/blob/bd7dad7b0939c556e582a0370686f6fc022c8af5/lib/rouge/formatters/terminal256.rb#L6-L42","documentation":"Error \"invalid theme: #{theme.inspect}\" thrown in rouge-ruby/rouge.","triggerScenarios":"Thrown at lib/rouge/formatters/terminal256.rb:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bd7dad7b0939c556e582a0370686f6fc022c8af5","analyzedAt":"2026-08-23T11:34:50.713Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}