## 1 Introduction  
Many industries, such as leather tanning, paint making, battery manufacturing industries, and others, generate liquid waste that is usually contaminated with toxic substances such as synthetic dyes and heavy metals [1, 2, 3]. The accumulation of these contaminants in living tissues throughout the food chain poses a serious health problem [4, 5]. Several studies have highlighted the direct and indirect toxic effects of dyes and heavy metals, which can lead to a wide range of health problems, such as renal failure, diarrhoea, lung cancer, liver damage, and asthma [6, 7, 8]. For these reasons, it is essential that effluents containing these pollutants are treated before they are released into the environment. In recent decades, various conventional physical-chemical methods have been used to remove heavy metals and dyes from industrial waste, including filtration, coagulation and flocculation, chemical oxidation with chlorine, ozone and hydrogen peroxide, and advanced oxidation processes (AOPs). However, of these many different wastewater treatment processes, only a few are commonly used by the industrial sector due to economic and technological reasons. Nevertheless, adsorption is often cited as the process of choice for the removal of many types of pollutants due to its cost effectiveness, flexibility of application, and simplicity of design [2; 9; 10]. Despite its remarkable performance, adsorption based on commercial activated carbon is expensive, as this carbon is produced from relatively expensive precursors [11; 12; 13; 14]. Therefore, the use of inexpensive and abundant materials, such as agro-industrial waste, has emerged in recent years as one of the most viable options for establishing waste management strategies [15]. The literature indicates that there have been numerous attempts to synthesise low-cost activated carbons from agro-industrial wastes such as orange peel [16], almond leaves [17], potato peel [18], water lily [19], oil palm empty fruit bunch [20], coffee husk [21], spent coffee grounds [22], and tea waste [23]. Coffee is the most important food commodity in the world and is second only to crude oil among all raw materials [24; 25; 26]. Spent coffee grounds (SCGs) are the residue of the coffee brewing process using hot water (\(\sim\)80 \({}^{\circ}\)C); for each ton of green coffee about 650 kg of SCGs are generated [27]. Currently, the main amount of waste coffee grounds follows the linear economy model and ends up in a landfill. The shift to the circular economy model proposes its exploitation in the production of energy and high value added materials [28]. As it is lignocellulosic in nature and rich in carbon, it would be highly desirable to use this waste as an alternative raw material to make activated carbon. Crystal violet dye is widely used as a cotton and silk dye in the textile industry. It is also used in the manufacture of pains and printing inks [29; 30]. Crystal violet is carcinogenic and has been classified as a recalcitrant molecule since it is poorly metabolised by microbes, is not biodegradable, and can persist in a variety of environments [31]. On the other hand, Cr (VI) is the highest priority toxic pollutant according to the US Environmental Protection Agency [32]. It is commonly used in the manufacture of pigments, in the treatment of metal surfaces, and in the chemical industry as an oxidising agent [33]. Some research has been undertaken for the valorisation of spent coffee grounds into activated carbon and for the fixation of dyes [22; 34; 35; 36; 37] and heavy metals [38; 39; 40]. However, studies in this area are recent and, according to our understanding, there are no studies associated with the removal of CV and Cr (VI) from water using KOH-activated SCGs as an adsorbent. In view of the above, the objectives of the present study are to produce an activated carbon from spent coffee grounds and to evaluate its adsorption capacity of CV and hexavalent chromium Cr (VI).