
<PAGE>   1


                                February 9, 1998



Universal Foods Corporation
433 East Michigan Street
Milwaukee, Wisconsin  53202

Ladies and Gentlemen:

         We have acted as counsel for Universal Foods Corporation, a Wisconsin
corporation (the "Company"), in connection with the preparation of a Form S-8
Registration Statement (the "Registration Statement") to be filed by the Company
with the Securities and Exchange Commission under the Securities Act of 1933, as
amended (the "Securities Act"), relating to 1,200,000 shares of the Company's
Common Stock, $.10 par value per share (the "Common Stock"), and rights to
purchase shares of Common Stock associated with each share of Common Stock
("Rights") that may be issued or acquired pursuant to the Universal Foods
Corporation 1998 Stock Option Plan (the "Plan").

         In such capacity, we have examined, among other documents, the Articles
of Incorporation of the Company, as amended, the Bylaws of the Company, as
amended, and the Registration Statement to be filed on or shortly after the date
of this letter covering the offering of the Company's Common Stock pursuant to
the Plan.

         Based on the foregoing and such additional investigation as we have
deemed necessary, it is our opinion that the shares of Common Stock to be
offered under the Plan have been legally and validly authorized under the
Articles of Incorporation of the Company and the laws of the State of Wisconsin.
When issued and paid for in accordance with the description set forth in the
Registration Statement and the Plan, the Common Stock will be legally issued,
fully-paid and non assessable, except as set forth in Wisconsin Statutes Section
180.0622(2)(b) as interpreted. We are also of the opinion that the Rights, if
issued, when issued pursuant to the terms of the Rights Agreement will be
validly issued.

         We consent to the use of this opinion as an exhibit to the Registration
Statement. In giving this consent, we do not admit that we are "experts" within
the meaning of Section 11 of the Securities Act or within the category of
persons whose consent is required by Section 7 of said Act.

                                                    Very truly yours,

                                                    WHYTE HIRSCHBOECK DUDEK S.C.


                                            By:     /s/ Andrew J. Guzikowski
                                                    ---------------------------
                                                    Andrew J. Guzikowski
