Previous studies have suggested that there are common mechanisms between perceptual and value-based processes. For instance, both perceptual and value-based choices are highly influenced by the context in which the choices are made. However, the mechanisms which allow context to influence our choice process as well as the extent of the similarity between the perceptual and preferential processes are still unclear. In this study, we examine a within-subject relation between the attraction effect, which is a well-known effect of context on preferential choice, and the Gestalt law of proximity. Then, we aim to use this link to better understand the mechanisms underlying the attraction effect. We conducted one study followed by an additional pre-registered replication study, where subjects performed a Gestalt-psychophysical task and a decoy task. Comparing the behavioral sensitivity of each subject in both tasks, we found that the more susceptible a subject is to the proximity law, the more she displayed the attraction effect. These results demonstrate a within-subject relation between a perceptual phenomenon (proximity law) and a value-based bias (attraction effect) which further strengthens the notion of common rules between perceptual and value-based processing. Moreover, this suggests that the mechanism underlying the attraction effect is related to grouping by proximity with attention as a mediator.