In some dialects, sockor/sockar is pronounced just like socker. Hence this extremely old joke (the thicker the dialect you can tell it in, the funnier):
- Vad tuggar du på? -Socker.
- Men det knastrar ju inte? -Raggsocker...
- What are you chewing? - "Sugar".
- But it doesn't crunch? - Woolen socks…
Woolen socks is an approximation, this is what raggsockar look like.
Don't forget "vita" is also used for definite words: "det vita huset" = "the white house " and "den vita bilen" = "the white car". It is a bit similar to the possessives which we already learned and you can scroll down with a browser at this page for that information: https://www.duolingo.com/skill/sv/Possessives
This page lists colors:
"He eats the white sugar" = "Han äter det vita sockret"
Swedish makes use of "double definitive" when a noun is modified by an adjective - if you translate "det vita sockret" word by word you would end up with "the white the sugar". It might seem a little odd but it's just how Swedish works.
Let's take two other nouns to illustrate the declination of adjectives, since 'socker' is uncountable (it has no plural form).
the curtain = gardinen
(a) white curtain = (en) vit gardin
the white curtain = den vita gardinen
the curtains = gardinerna
white curtains = vita gardiner
the white curtains = de vita gardinerna
the house = huset
(a) white house = (ett) vitt hus
the white house = det vita huset
the houses = husen
white houses = vita hus
the white houses = de vita husen
As you can see, 'vita' is not only used for plurals but also for singular nouns in the definite form (den vita gardinen, det vita huset). To say "den vit gardinen" or "det vitt huset" is incorrect Swedish.
Hope it clarifies :)