Changeset 391 for binary-improvements2/7dtd-server-fixes/src/AllocsUtils.cs
- Timestamp:
- Aug 7, 2022, 3:02:24 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/7dtd-server-fixes/src/AllocsUtils.cs
r325 r391 4 4 public static class AllocsUtils { 5 5 public static string ColorToHex (Color _color) { 6 return string.Format ("{0:X02}{1:X02}{2:X02}", (int) (_color.r * 255), (int) (_color.g * 255), 7 (int) (_color.b * 255)); 6 return $"{(int)(_color.r * 255):X02}{(int)(_color.g * 255):X02}{(int)(_color.b * 255):X02}"; 8 7 } 9 8 }
Note:
See TracChangeset
for help on using the changeset viewer.