Вы можете использовать метод Convert.ToByte(String, Int32)
, при этом базовый набор равен 16 (шестнадцатеричный):
String text = "d7";
byte value = Convert.ToByte(text, 16);
Добавлен ваш код
background-size: 250% 250%;
Пример
.slideToUnlock {
background: linear-gradient(-90deg, black 0%, gray 40%, white 45%, gray 55%, black 60%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent;
-webkit-animation: slidetounlock 5s infinite;
animation: slidetounlock 5s infinite;
-webkit-animation-direction: normal;
animation-direction: normal;
background-size: 250% 250%;
}