Slacks are fine, and black is best. But in the end, it’s up to you. Personally, I do have respect for those closest to the deceased, but my urge is to show up at the funeral in the gear the deceased would be most accustomed to seeing me wear. It’s an odd view, I’ll grant you.
Show up. Say nice things. Anything but a tropical bright shirt would be fine. (unless tropical bright shirts was a fun thing the deceased would have laughed about and the living survivors would ‘get’.)
Just an anecdote
My late brother-in-law was a fanatical golfer. Spent every free minute on the golf course.
He died on July 1st, in the midst of a terrible, extended heat wave in New Jersey,
My sister-in-law buried him in a golf shirt with some golf paraphenalia in the coffin..
Because of the heat she insisted that we all wear golf shirts and not wear suits and ties to mass.
A picture from the burial scene shows everyone in yellows and orange and bright blue. A cheery side to a very uncheerful event.
Anything dark and conservative. By conservative I mean cover your shoulder and skirts no shorter than knee length. Slacks should be fine. I usually wear black, but I see people in other dark colors and business casual type clothing. Some people dress up more.
Black. The blackest black. I have a go-to funeral suit. All black silk and silk blends. It reeks funeral. Or mafioso, depending on the occasion and the tie pin.
I don’t understand use of particular color of clothes for such occasions. In some cultures ( like Hindus) wear white clothes for that. Nothing flashy, just normal clothes should be fine irrespective of color.