Make some noise-cancelling headphones
Pyth, 54 51 bytes
J128m.MZ,0h.mb,255?&lt;dJ.E-tJc-tJdQs+c-dJQJm-255id16E

Try it here!
Explanation

J128m.MZ,0h.mb,255?&lt;dJ.E-tJc-tJdQs+c-dJQJm-255id16E   # Q = modifier, E = input list

J128                                                  # set J to 128
                                         m        E   # map each input d
                                              id16    # convert to decimal
                                          -255        # get the complement
    m                                                 # map each complement d
                  ?&lt;dj                                # if d &lt; 128
                      .E-tJc-tJdQ                     # use the ceil-formula
                                 s+c-dJQJ             # otherwise use the floor-formular
          .mb,255                                     # minimum of the result and 255
    .MZ,0h                                            # maximum of the result and 0