Your boss doesn’t seem to like you. You always get assigned the worst tasks and are scheduled for the most inconvenient hours. When you make suggestions regarding how to improve things, you’re flatly ignored. When you ask for a better schedule or more responsibility, your boss called you a lazy malcontent. Nobody else seems to get treated that way.

Is that discrimination? Probably, but it may or may not be illegal.

Legally speaking, discrimination that is based on any protected factor (such as race, skin color, religion, sex, pregnancy, sexual orientation, gender identity, national origin, your age if you’re over 40, genetic information or disability) is actionable. Discrimination based on other factors (like your political views or what football team you support) isn’t.

To figure out if your employer’s discrimination is a violation of the law, you may have to compare your situation to others in your workplace. What’s the main difference or differences between you and the employees who seem to have your boss’s favor?

Sometimes managers who engage in discrimination will be blatant about their biases. They may routinely promote white, male workers while keeping female employees and those of other races in low-level positions. If, for example, your employer responds to your request for better hours with a comment like, “You people always want more,” that’s a good indicator that they’re seeing you as a member of a minority group — not an individual.

When you’re caught up in a situation, it can be difficult to tell whether you have a legal cause of action or not. An experienced attorney can help you sort it out.