Search Issue Tracker
By Design
Votes
0
Found in
2017.1.1f1
Issue ID
958585
Regression
No
ColorUtility.ToHtmlStringRGBA returns hexadecimal color code string without #
Steps to reproduce:
1.Open attached “ ToHtmlStringRGBA.zip” Unity project
2.Open scene “Test"
3.Enter Play mode
Expected results:
ColorUtility.ToHtmlStringRGBA returns "#4FAE60FF"
Actual results:
ColorUtility.ToHtmlStringRGBA returns “4FAE60FF"
Reproduced in: 2017.3.0b4, 2017.2.0f3, 2017.1.2p1, 5.6.4f1, 5.5.5p1, 5.5.0a6
Note: ColorUtility.TryParseHtmlString cannot parse the color code without # and returns RGBA(1.000, 1.000, 1.000, 1.000)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Johnny-Fuzz
Oct 25, 2024 00:10
This is still an issue in Unity 6000.0.23f1.
You have to make sure that you pass a # in the ColorUtility.TryParseHtmlString() if you don't include the # it will not work even though the documentation says otherwise.