<commit_before>module RbColors
  module Colorsys
    def self.rgb_to_hsv(r, g, b)
      max_color = [r, g, b].max
      min_color = [r, g, b].min
      v = max_color
      return [0.0, 0.0, v] if max_color == min_color
      s = (max_color - min_color) / max_color
      rc = (max_color - r) / (max_color - min_color)
      gc = (max_color - g) / (max_color - min_color)
      bc = (max_color - b) / (max_color - min_color)
      if r == max_color
        h = bc - gc
      elsif g == max_color
        h = 2.0 + rc - bc
      else
        h = 4.0 + gc - rc
      end
      h = (h / 6.0) % 1.0
      [h, s, v]
    end

    def self.hsv_to_rgb(h, s, v)
      return [v, v, v] if s == 0.0
      i = (h * 6.0).to_i
      f = (h * 6.0) - i
      p = v * (1.0 - s)
      q = v * (1.0 - s * f)
      t = v * (1.0 - s * (1.0 - f))
      i = i % 6
      case i
      when 0
        [v, t, p]
      when 1
        [q, v, p]
      when 2
        [p, v, t]
      when 3
        [p, q, v]
      when 4
        [t, p, v]
      when 5
        [v, p, q]
      end
    end
  end

  class Color
    def hex
      HexColor.new('%02x%02x%02x' % rgb.to_a)
    end

    def rgb
      raise NotImplementedErrorr
    end

    def hsv
      raise NotImplementedError
    end
<commit_msg>Fix typo in RbColors::Color#rgb<commit_after>module RbColors
  module Colorsys
    def self.rgb_to_hsv(r, g, b)
      max_color = [r, g, b].max
      min_color = [r, g, b].min
      v = max_color
      return [0.0, 0.0, v] if max_color == min_color
      s = (max_color - min_color) / max_color
      rc = (max_color - r) / (max_color - min_color)
      gc = (max_color - g) / (max_color - min_color)
      bc = (max_color - b) / (max_color - min_color)
      if r == max_color
        h = bc - gc
      elsif g == max_color
        h = 2.0 + rc - bc
      else
        h = 4.0 + gc - rc
      end
      h = (h / 6.0) % 1.0
      [h, s, v]
    end

    def self.hsv_to_rgb(h, s, v)
      return [v, v, v] if s == 0.0
      i = (h * 6.0).to_i
      f = (h * 6.0) - i
      p = v * (1.0 - s)
      q = v * (1.0 - s * f)
      t = v * (1.0 - s * (1.0 - f))
      i = i % 6
      case i
      when 0
        [v, t, p]
      when 1
        [q, v, p]
      when 2
        [p, v, t]
      when 3
        [p, q, v]
      when 4
        [t, p, v]
      when 5
        [v, p, q]
      end
    end
  end

  class Color
    def hex
      HexColor.new('%02x%02x%02x' % rgb.to_a)
    end

    def rgb
      raise NotImplementedError
    end

    def hsv
      raise NotImplementedError
    end

{'fraction_non_alphanumeric': 0.13252064490758947, 'fraction_numerical': 0.03067243413291388, 'mean_word_length': 1.2394366197183098, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4973959', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1066, 'n_words': 321}