rouge-ruby/rouge · error · RuntimeError

not in palette: #{arg.inspect}

Error message

not in palette: #{arg.inspect}

What it means

Error "not in palette: #{arg.inspect}" thrown in rouge-ruby/rouge.

Source

Thrown at lib/rouge/theme.rb:62

    end

    def styles
      @styles ||= self.class.styles.dup
    end

    @palette = {}
    def self.palette(arg={})
      @palette ||= InheritableHash.new(superclass.palette)

      if arg.is_a? Hash
        @palette.merge! arg
        @palette
      else
        case arg
        when /#[0-9a-f]+/i
          arg
        else
          @palette[arg] or raise "not in palette: #{arg.inspect}"
        end
      end
    end

    def palette(*a) self.class.palette(*a) end

    @styles = {}
    def self.styles
      @styles ||= InheritableHash.new(superclass.styles)
    end

    def self.render(opts={}, &b)
      new(opts).render(&b)
    end

    def get_own_style(token)
      self.class.get_own_style(token)
    end

View on GitHub (pinned to bd7dad7b09)

When it happens

Trigger: Thrown at lib/rouge/theme.rb:62 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rouge-ruby/rouge@bd7dad7b09 (2026-08-23). Data as JSON: /api/errors/4a044c1c461cb51a. Report an issue: GitHub.