Point-of-care quantification of the anticoagulant heparin still remains a significant clinical challenge as the reference method (colorimetric anti-factor Xa assay) cannot be performed in whole blood. Our group recently put forth the novel optical nanosensing principle using an ionic solvatochromic dye as a signal transducer. These nanosensors demonstrated significantly improved selectivity and sensitivity compared to ion-exchange-type polyion nanosensors and enabled protamine/heparin quantification in blood plasma samples. However, because the readout is absorbance-based, they are still not suitable for whole blood measurements. To overcome the background absorbance of blood, the nanosensors were here embedded in an agarose hydrogel capable of filtering out red blood cells while allowing plasma components to diffuse into the gel. Calibration curves for both protamine and heparin were successfully obtained in buffer, undiluted plasma, and undiluted whole blood using different colorimetric image analysis methods and a simple experimental setup.