小葱拌豆腐一清二白 is a 歇後語
歇後語:
two-part allegorical saying; enigmatic folk simile; truncated witticism
[literal] after-pause saying
小葱 is green onion, which is white and green; 豆腐 is tofu, which is white
The first part of the allegorical 小葱拌豆腐 means "green onion mix with tofu"
The second part of the allegorical 一青二白 means "it is either green or white"
And 青 sounds like 清(clean), therefore the real expression is 一清二白 (clean and pure)
The term 清白 (clean + white/ pure) is a compound word for "innocent/ "guildless"
一清二白 emphasize both characters in 清白.
The common expressions using the same [一(X)二(Y)] structure include:
清楚 (clear) --> 一清二楚 (completely clear)
乾淨 (clean) --> 一乾二淨 (completely and cleanly; completely clean)
窮(poor) 白(bare/ empty) --> 一窮二白 (poor and have nothing)
If 清白 means "guildless" , then 一清二白 would mean "completely guildless".
Unlike 一清二楚 and 一乾二淨, 一清二白 is not a common expression. That is one strike against it for listing in dictionary.
小葱拌豆腐 - 一清二白 is more of a enigmatic folk simile. its usage is only regional, if it end up as an dictionary entry, it has to be labeled as "regional folk saying".
I have never heard a similar expression of 小葱拌豆腐 in Cantonese before, the usage of this two-part allegorical saying is certainly not universal.
Some examples of two-part allegorical:
(Mandarin) 和尚打傘 - 無(髮)法無天 / (Cantonese) 和尚擔遮 - 無(髮)法無天 = "lawless"
(Mandarin) 肉包子打狗 - 有去沒回 = "gone forever"
(Cantonese) 寡母婆死仔 - 冇晒望 = "hopeless"
(Cantonese) 賣魚佬冲涼 - 冇(腥)聲氣 = "no result" ; "no sign"