Start from a known color
Use a HEX value or sample a pixel from an image, then inspect RGB/HSL values. Pixel sampling uses the browser-decoded image, not a calibrated physical measurement. Alpha and the actual background matter when a color is transparent.
Separate harmony from contrast
Complementary or triadic hues can look attractive without making readable text. Test the exact foreground/background pair and the actual font size and states. RGB distance is not a perceptual Delta E score and does not substitute for contrast testing.
Export for the intended medium
A CSS gradient is code, while shades and tints are suggested color values. CMYK conversions here are simple approximations without ICC profiles. For print-critical work, obtain the printer’s requirements and a proper proof rather than relying on a screen swatch.