Hematoxylin is a basic dye that binds to the acidic components of the nucleus, such as DNA and RNA. After binding, it is oxidized to form hematein, which then forms a complex with metal ions (usually aluminum) to create a blue-purple color. This specific binding makes the nucleus stand out against the cytoplasm and other tissue components.