I have a formula I use to determine how opaque some validation text should be based upon the length of a user's input compared to the maximum lenth allowed. I want to modify it so that the "ramping up" of the opacity percentage only starts when they are at 80% of max, and then scales up proportionally from there.
Here is my current function:
OpacityPercentage = CharactersEntered / MaxCharacters
Therefore, if I have MaxCharacters of 50, then the opacity is as follows:
- 30 chars = 60%
- 40 chars = 80%
- 41 chars = 82%
- 45 chars = 90%
- 50 chars = 100%
What I want is for the opacity to be 0% until I get to 80% of max, then scale up from there. So I would want the table to look as follows:
- 30 chars = 0%
- 40 chars = 0%
- 41 chars = 10%
- 45 chars = 50%
- 50 chars = 100%
I thought this would be simple, but I can't seem to figure out what I need to change in my existing formula. Any advise is appreciated!