We present a detailed motivation for and definition of the contextual values of an observable, which were introduced by Dressel et al. [Phys. Rev. Lett. 104 240401 (2010)]. The theory of contextual values is a principled approach to the generalized measurement of observables. It extends the well-established theory of generalized state measurements by bridging the gap between partial state collapse and the observables that represent physically relevant information about the system. To emphasize the general utility of the concept, we first construct the full theory of contextual values within an operational formulation of classical probability theory, paying special attention to observable construction, detector coupling, generalized measurement, and measurement disturbance. We then extend the results to quantum probability theory built as a superstructure on the classical theory, pointing out both the classical correspondences to and the full quantum generalizations of both Lüder’s rule and the Aharonov-Bergmann-Lebowitz rule in the process. As such, our treatment doubles as a self-contained pedagogical introduction to the essential components of the operational formulations for both classical and quantum probability theory. We find in both cases that the contextual values of a system observable form a generalized spectrum that is associated with the independent outcomes of a partially correlated and generally ambiguous detector; the eigenvalues are a special case when the detector is perfectly correlated and unambiguous. To illustrate the approach, we apply the technique to both a classical example of marble color detection and a quantum example of polarization detection. For the quantum example we detail two devices: Fresnel reflection from a glass coverslip, and continuous beam displacement from a calcite crystal. We also analyze the three-box paradox to demonstrate that no negative probabilities are necessary in its analysis. Finally, we provide a derivation of the quantum weak value as a limit point of a pre- and postselected conditioned average and provide sufficient conditions for the derivation to hold.