<commit_before>describe UI::Color do
  context "#() protocol conversion" do
    before do
      @blue_color = UIColor.blueColor
      @blue_alpha_color = UIColor.colorWithRed(0/255.0, green:0/255.0, blue:1/255.0, alpha:1.0)

      r, g, b, a = [1, (0x8A.to_f/0xFF.to_f), (0x19/0xFF.to_f), (0x88.to_f/0xFF.to_f)]
      @orange_color = UIColor.colorWithRed(r, green:g, blue:b, alpha:1.0)
      @orange_alpha_color = UIColor.colorWithRed(r, green:g, blue:b, alpha:a)
    end

    it "should convert a String with a #" do
      UI::Color("#00F").container.should == @blue_color
    end

    it "should convert a String without a #" do
      UI::Color("00F").container.should == @blue_color
    end

    it "should convert a String without 3 digits" do
      UI::Color("00F").container.should == @blue_color
    end

    it "should convert a String without 6 digits" do
      UI::Color("FF8A19").container.should == @orange_color
    end

    it "should convert a String without 8 digits (alpha component)" do
      UI::Color("88FF8A19").container.should == @orange_alpha_color
    end

    it "should convert a 3 values Array to rgba with default alpha = 255" do
      UI::Color([0, 0, 1]).container.should == @blue_alpha_color
    end

    it "should convert a 4 values Array" do
      UI::Color([0, 0, 1, 255]).container.should == @blue_alpha_color
    end

    it "should convert a UIColor" do
      UI::Color(UIColor.blueColor).container.should == @blue_color
    end

    it "should convert a Symbol" do
      UI::Color(:blue).container.should == UIColor.blueColor
    end<commit_msg>UI::Color spec is now cross platform<commit_after>describe UI::Color do
  context "#() protocol conversion" do
    it "should convert a String with a #" do
      UI::Color("#00F").to_a.should == [0, 0, 255, 255]
    end

    it "should convert a String without a #" do
      UI::Color("00F").to_a.should == [0, 0, 255, 255]
    end

    it "should convert a String without 6 digits" do
      UI::Color("FF8A19").to_a.should == [255, 137, 24, 255]
    end

    it "should convert a String without 8 digits (alpha component)" do
      UI::Color("88FF8A19").to_a.should == [255, 137, 24, 135]
    end

    it "should convert a 3 values Array to rgba with default alpha = 255" do
      UI::Color([0, 0, 1]).to_a.should == [0, 0, 1, 255]
    end

    it "should convert a 4 values Array" do
      UI::Color([0, 0, 1, 255]).to_a.should == [0, 0, 1, 255]
    end

    it "should convert native platform Color object" do
      if defined?(UIColor)
        UI::Color(UIColor.blueColor).to_a.should == [0, 0, 255, 255]
      else
        UI::Color(Android::Graphics::Color.argb(255, 0, 0, 255)).to_a.should == [0, 0, 255, 255]
      end
    end

    it "should convert a Symbol" do
      UI::Color(:blue).to_a.should == [0, 0, 255, 255]
    end
{'fraction_non_alphanumeric': 0.1369279886484569, 'fraction_numerical': 0.061014544164597374, 'mean_word_length': 2.971830985915493, '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': '2458322', 'n_tokens_mistral': 1098, 'n_tokens_neox': 948, 'n_words': 294}