How to change the colour of certain field type

l wish to add another field other than status like general by i got default color how to i change that colors,

Hi @Mohamed2335,

Please check the syntax and apply it according to your scenario.

frappe.listview_settings['Project'] = {
	refresh: function(listview) {
	    $('*[data-filter="cargo_type,=,General"]').css({'color':'#1579d0', 'background':'#D3E9FA'}); // blue
        $('*[data-filter="cargo_type,=,ABC"]').css({'color':'#e24c4c', 'background':'#fff5f5'}); // red
        $('*[data-filter="cargo_type,=,XYZ"]').css({'color':'#f8814f', 'background':'#fff5f0'}); // orange
        $('*[data-filter="cargo_type,=,PQR"]').css({'color':'#2f9d58', 'background':'#eaf5ee'}); // green

Please check your Cargo Type field name and set it according.

Thank You!

can i apply on client script

Yes @Mohamed2335.

Please apply the client script for Listview.

thanks for your help

@NCP what if i want to change the value of the field with a specific value?

for ex, a field whose value is “saturday” shcould chnage to red.