In Texas, a person may not wear apparel or a similar communicative device relating to a candidate, measure, or political party appearing on the ballot in the current election, but a person may wear such apparel relating to a candidate, measure, or political party that does NOT appear on the ballot in the current election.
In other words, if you are wearing a hat, t-shirt, or button relating to a candidate, measure or political party that does not appear on the ballot in the current election, you are not violating Texas law.
However, if you are wearing apparel relating to a candidate, measure, or political party on the ballot, a presiding judge has the ability to enforce the law within the 100-foot marker outside of the polling place entrance. You may be asked to remove or cover up your apparel before entering the building.