Ad
  • Custom User Avatar

    Random tests were added.

  • Custom User Avatar

    You are welcome :)

    Thank you for solving my Kata.

  • Custom User Avatar

    :smirk:

    Hint: look at your first if statement.

    if (boolean1 || !Pattern.matches("[0-9a-fA-F]+", hexColor) || boolean3)
    
  • Custom User Avatar

    I run your code and.. yeah, it actually doesn't calculate complementary color for empty string.

    Note that if input argument has length less than 6 then you should add a few zeros on begin:

    "" -> "000000"

    "FFF" -> "000FFF"

    Due to the programming practice it's not necessary, but at the moment of writing this Kata I decided to make it little more complicated :)

  • Custom User Avatar

    It seems that you've stucked on this test:

    assertEquals("#FFFFFF", HTMLComplementaryColor.getReversedColor(""));
    

    Note that if input argument has length less than 6 then you should add a few zeros on begin:
    "" -> "000000"
    "FFF" -> "000FFF"