Combine sugar and vinegar and heat over low heat.
Stir until sugar is dissolved.
Set aside to cool.
When vinegar mixture is cool, add mustard seed, celery seed, salt, onion, green pepper, and red pepper or pimento.
Pour over cabbage and mix.
Put in container, cover and store in refrigerator.
Let stand in refrigerator for several days to develop flavor and crispness.