A chitosan-based biofilm modified with ginger essential oil and butterfly flower extract has been made. This biofilm was tested for its potential as a raw material for smart and environmentally friendly packaging (smart and green packaging). The potential of biofilm as a packaging raw material is known from the characterization results, which include color changes at various pHs, mechanical properties, antioxidant properties, antibacterial properties, and morphological structure. The produced biofilms exhibit sensitivity to alterations in pH levels, manifesting distinct color transitions from pink and purple to green within the pH range of 1 to 12. This phenomenon arises due to adding butterfly flower extract into the biofilm, which contains anthocyanin dyes with a total concentration of 1113.3 mg/L. Adding butterfly flower extract and ginger oil contributes to an augmented biofilm thickness; however, this is accompanied by a reduction in both tensile strength and percent elongation. Concurrently, the addition of butterfly flower extract and ginger oil imparts antioxidant and antibacterial properties to the biofilm. The introduction of additional extracts enhances the antioxidant and antibacterial attributes of the biofilm. In the color and pH response assessment, the biofilm augmented with a 7.5% v/v extract exhibited a color difference value (ΔE) exceeding 5 across all assessed pH values. These findings signify the observable color variations in the biofilm due to pH fluctuations with the unaided eye. According to the outcomes of characterization and analysis, the produced biofilm holds promise as an environmentally friendly packaging solution due to its reliance on natural components and its endowed antioxidant and antibacterial properties, contributing to the prolonged preservation of packaged food items. Moreover, the biofilm demonstrates the capability to gauge the quality of food products based on their pH, which is evident through direct color alterations.